mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-13 09:57:51 +08:00
Add tests for the "assoc" builtin.
This commit is contained in:
parent
d1b75c7097
commit
85479b09e6
|
@ -346,6 +346,9 @@ var evalTests = []struct {
|
|||
{`has-value "foo" o`, want{out: bools(true)}},
|
||||
{`has-value "foo" d`, want{out: bools(false)}},
|
||||
|
||||
{`put (assoc [0] 0 zero)[0]`, want{out: strs("zero")}},
|
||||
{`put (assoc [&] k v)[k]`, want{out: strs("v")}},
|
||||
{`put (assoc [&k=v] k v2)[k]`, want{out: strs("v2")}},
|
||||
{`has-key (dissoc [&k=v] k) k`, want{out: bools(false)}},
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user