mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-13 01:47:51 +08:00
eval: More tests against builtins.
This commit is contained in:
parent
347782b868
commit
1874df52c3
|
@ -22,13 +22,19 @@ var builtinFnTests = []evalTest{
|
|||
{`bool $false`, wantFalse},
|
||||
|
||||
{`not $false`, wantTrue},
|
||||
{`not ?(fail x)`, wantTrue},
|
||||
{`not $true`, wantFalse},
|
||||
{`not 0`, wantFalse},
|
||||
|
||||
{`is 1 1`, wantTrue},
|
||||
{`is a b`, wantFalse},
|
||||
{`is [] []`, wantTrue},
|
||||
{`is [1] [1]`, wantFalse},
|
||||
{`eq 1 1`, wantTrue},
|
||||
{`eq a b`, wantFalse},
|
||||
{`eq [] []`, wantTrue},
|
||||
{`eq [1] [1]`, wantTrue},
|
||||
{`not-eq a b`, wantTrue},
|
||||
|
||||
{`f=(constantly foo); $f; $f`, want{out: strs("foo", "foo")}},
|
||||
{`(constantly foo) bad`, want{err: errAny}},
|
||||
|
|
Loading…
Reference in New Issue
Block a user