new operator 'map' ans general variable access by ${}

This commit is contained in:
2026-04-24 20:11:25 +02:00
parent 20d8236325
commit 6ee365bacc
10 changed files with 134 additions and 23 deletions
+3 -2
View File
@@ -31,8 +31,9 @@ func TestIteratorParser(t *testing.T) {
/* 20 */ {`it=$({1:"one",2:"two",3:"three"}, "default", "value"); it++`, "one", nil},
/* 21 */ {`it=$({1:"one",2:"two",3:"three"}, "desc", "key"); it++`, int64(3), nil},
/* 22 */ {`it=$({1:"one",2:"two",3:"three"}, "asc", "item"); it++`, NewList([]any{int64(1), "one"}), nil},
/* 23 */ {`builtin "os.file"; fileReadIterator("test-file.txt") map ${_index}`, NewList([]any{int64(0), int64(1)}), nil},
}
// runTestSuiteSpec(t, section, inputs, 20)
runTestSuite(t, section, inputs)
runTestSuiteSpec(t, section, inputs, 23)
// runTestSuite(t, section, inputs)
}