diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-01-21 15:03:26 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-01-21 15:03:26 +0200 |
commit | 67382c15f7e9176dea44c3da7f7013759c88ce33 (patch) | |
tree | 5ff4fe1436792a01d4a8576f1e0efa3ce2ff9c20 /tests/eval | |
parent | 41f091f46b47c20dc1571db5d56a1eaade25cb1e (diff) |
Add support for ==, != in eval context
Diffstat (limited to 'tests/eval')
-rw-r--r-- | tests/eval/buildfile | 30 | ||||
-rw-r--r-- | tests/eval/test.out | 16 |
2 files changed, 46 insertions, 0 deletions
diff --git a/tests/eval/buildfile b/tests/eval/buildfile index cf315b6..06fb5fb 100644 --- a/tests/eval/buildfile +++ b/tests/eval/buildfile @@ -12,3 +12,33 @@ print ((foo) (bar)) print (foo\ bar) + +# !=, == vs !, = recognition +# +print (=) +print (!) +print (= foo) +print (foo!) + +# !=, == evaluation +# + +# print ( == bar) +# print (foo == ) + +print (foo == bar) +print (foo == foo) +print (foo != bar) +print (foo != foo) + +print (foo == (foo)) +print ((foo bar) == foo bar) +print (foo != foo bar) +print ("" == '') + +print ((foo != bar) baz) +print "foo equals bar is (foo == bar)" + +foo = foo +print ($foo == foo) +print (bar != $foo) diff --git a/tests/eval/test.out b/tests/eval/test.out index 5885c7d..599f928 100644 --- a/tests/eval/test.out +++ b/tests/eval/test.out @@ -2,3 +2,19 @@ foobar foo bar foobar += +! += foo +foo! +false +true +true +false +true +true +true +true +true baz +foo equals bar is false +true +true |