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) +}