From 948bad6f96ccb1f92c325c784073f9e015dc0777 Mon Sep 17 00:00:00 2001 From: Celestino Amoroso Date: Thu, 30 Jul 2026 15:35:25 +0200 Subject: [PATCH] t_common_test.go: added function fileExists() --- t_common_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/t_common_test.go b/t_common_test.go index 499750f..41f9926 100644 --- a/t_common_test.go +++ b/t_common_test.go @@ -6,6 +6,7 @@ package expr import ( "errors" + "os" "path" "runtime" "strings" @@ -176,3 +177,10 @@ func testIteratorCallOp(t *testing.T, section string, it kern.Iterator) { t.Errorf(`%s -- CallOperation("fake") should return error`, section) } } + +// Test utilities + +func fileExists(filePath string) bool { + _, err := os.Stat(filePath) + return !errors.Is(err, os.ErrNotExist) +}