int-iterator is now defined interval

This commit is contained in:
2026-07-28 07:16:49 +02:00
parent 8e596d5979
commit 648533cbe3
12 changed files with 90 additions and 70 deletions
+7 -5
View File
@@ -31,8 +31,12 @@ func TestExpr(t *testing.T) {
/* 15 */ {`a=3; a*=2)+1; a`, nil, `[1:11] unexpected token ")"`},
/* 16 */ {`v=[2]; a=1; v[a-=1]=5; v[0]`, int64(5), nil},
/* 17 */ {`true ? {"a"} :: {"b"}`, "a", nil},
/* 18 */ {`$$`, dict.NewDict(map[any]any{"vars": dict.NewDict(nil), "funcs": dict.NewDict(nil)}), nil},
/* 19 */ {`
/* 18 */ {`2 ? {"a"}`, nil, `[1:2] no case catches the value (2) of the selection expression`},
/* 19 */ {`2 ? 5`, nil, "[1:6] expected `{`, got `5`"},
/* 20 */ {`a=2; ${a}`, int64(2), nil},
/* 21 */ {`$_=2; $_`, int64(2), nil},
/* 22 */ {`$$`, dict.NewDict(map[any]any{"vars": dict.NewDict(nil), "funcs": dict.NewDict(nil)}), nil},
/* 23 */ {`
ds={
"init":func(@end){@current=0 but true},
//"current":func(){current},
@@ -44,11 +48,9 @@ func TestExpr(t *testing.T) {
it++;
it++
`, int64(1), nil},
/* 20 */ {`a=2; ${a}`, int64(2), nil},
/* 21 */ {`$_=2; $_`, int64(2), nil},
}
// t.Setenv("EXPR_PATH", ".")
// runTestSuiteSpec(t, section, inputs, 21)
// RunTestSuiteSpec(t, section, inputs, 19)
RunTestSuite(t, section, inputs)
}