t_common_test.go: added function fileExists()

This commit is contained in:
2026-07-30 15:35:25 +02:00
parent 1c4ba5ef0b
commit 948bad6f96
+8
View File
@@ -6,6 +6,7 @@ package expr
import ( import (
"errors" "errors"
"os"
"path" "path"
"runtime" "runtime"
"strings" "strings"
@@ -176,3 +177,10 @@ func testIteratorCallOp(t *testing.T, section string, it kern.Iterator) {
t.Errorf(`%s -- CallOperation("fake") should return error`, section) 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)
}