new operator 'join'

This commit is contained in:
2026-04-25 06:55:09 +02:00
parent 49728307f3
commit 7d2cf1e687
6 changed files with 74 additions and 4 deletions
+3 -1
View File
@@ -37,10 +37,12 @@ func TestOperator(t *testing.T) {
/* 24 */ {`[1,2,3] map $_`, newList([]any{int64(1), int64(2), int64(3)}), nil},
/* 25 */ {`[1,2,3,4] filter ($_ % 2 == 0)`, newList([]any{int64(2), int64(4)}), nil},
/* 26 */ {`max=0; [2,3,1] digest max=(($_ > max) ? {$_} :: {max})`, int64(3), nil},
/* 27 */ {`["a","b"] join ["x"]`, newList([]any{"a", "b", "x"}), nil},
/* 28 */ {`["a","b"] join ["x"-true]`, nil, `[1:21] left operand 'x' [string] and right operand 'true' [bool] are not compatible with operator "-"`},
}
// t.Setenv("EXPR_PATH", ".")
// runTestSuiteSpec(t, section, inputs, 25)
// runTestSuiteSpec(t, section, inputs, 28)
runTestSuite(t, section, inputs)
}