Iterator: added support for iterators over dictionaries

This commit is contained in:
2026-04-19 15:08:14 +02:00
parent d7dd628fc9
commit 807df0f3a8
7 changed files with 280 additions and 26 deletions
+4 -2
View File
@@ -27,8 +27,10 @@ func TestIteratorParser(t *testing.T) {
/* 16 */ {`include "test-resources/filter.expr"; it=$(ds,10); it++`, int64(2), nil},
/* 17 */ {`it=$({"next":func(){5}}); it++`, int64(5), nil},
/* 18 */ {`it=$({"next":func(){5}}); it.clean`, nil, nil},
/* 19 */ {`it=$({1:"one",2:"two",3:"three"}); it++`, int64(1), nil},
/* 20 */ {`it=$({1:"one",2:"two",3:"three"}, "default", "value"); it++`, "one", nil},
}
//runTestSuiteSpec(t, section, inputs, 18)
runTestSuite(t, section, inputs)
runTestSuiteSpec(t, section, inputs, 20)
// runTestSuite(t, section, inputs)
}