increased test coverage and splitted some utility functions by OS

This commit is contained in:
2026-04-26 06:16:43 +02:00
parent 7d2cf1e687
commit f100adead3
6 changed files with 234 additions and 40 deletions
+5 -2
View File
@@ -30,10 +30,13 @@ func TestFuncOs(t *testing.T) {
/* 16 */ {`builtin "os.file"; it=fileReadIterator("test-file.txt"); it++`, "uno", nil},
/* 17 */ {`builtin "os.file"; it=fileReadIterator("test-file.txt"); it++;it++;it++`, nil, io.EOF.Error()},
/* 18 */ {`builtin "os.file"; it=fileReadIterator("test-file.txt"); it.clean`, nil, nil},
/* 19 */ {`builtin "os.file"; it=fileReadIterator("test-file.txt"); string(it)`, `$(fileReadTextIterator@"test-file.txt")`, nil},
/* 20 */ {`builtin "os.file"; handle=fileOpen("/etc/hosts"); fileClose(handle); string(handle)`, `reader`, nil},
/* 21 */ {`builtin "os.file"; handle=fileCreate("/tmp/dummy"); fileClose(handle); string(handle)`, `writer`, nil},
}
// t.Setenv("EXPR_PATH", ".")
runTestSuiteSpec(t, section, inputs, 18)
// runTestSuite(t, section, inputs)
// runTestSuiteSpec(t, section, inputs, 19)
runTestSuite(t, section, inputs)
}