int-iterator: fixed iterator's index value

This commit is contained in:
2026-07-31 07:26:41 +02:00
parent 7430e9bdf7
commit 1d15b99740
2 changed files with 25 additions and 23 deletions
+2 -1
View File
@@ -45,9 +45,10 @@ func TestIteratorParser(t *testing.T) {
/* 26 */ {`it=$(1..5..2); it++`, int64(1), nil},
/* 27 */ {`it=$(1.5..5..2); it++`, nil, `[1:13] interval expression expected integer, got float (1.5)`},
/* 28 */ {`it=$(.."z"); it++`, nil, `[1:7] interval expression expected integer, got string (z)`},
/* 29 */ {`it=$(3..1); it++; it.index`, int64(0), nil},
}
// RunTestSuiteSpec(t, section, inputs, 27)
// RunTestSuiteSpec(t, section, inputs, 25)
RunTestSuite(t, section, inputs)
}