Added non-sorted disclosure

This commit is contained in:
Leon Mika 2024-04-16 22:29:59 +10:00
parent c0f5cfb180
commit ad528e60e6

View file

@ -183,6 +183,7 @@ func TestBuiltins_ForEach(t *testing.T) {
foreach ["1" "2" "3"] { |v| foreach ["1" "2" "3"] { |v|
echo $v echo $v
}`, want: "1\n2\n3\n(nil)\n"}, }`, want: "1\n2\n3\n(nil)\n"},
// TODO: hash is not sorted, so need to find a way to sort it
{desc: "iterate over map", expr: ` {desc: "iterate over map", expr: `
foreach [a:"1"] { |k v| echo $k "=" $v }`, want: "a=1\n(nil)\n"}, foreach [a:"1"] { |k v| echo $k "=" $v }`, want: "a=1\n(nil)\n"},
} }