Added tests for keyword operators in tstrongspaces

Changed one old test to account for the effect of strong spaces on "and" and cia now.
This commit is contained in:
ReneSac 2015-04-08 02:08:29 -03:00
commit 5bbebe4a89

View file

@ -2,6 +2,12 @@
discard """ discard """
output: '''35 output: '''35
true
true
4
true
1
false
77 77
(Field0: 1, Field1: 2, Field2: 2) (Field0: 1, Field1: 2, Field2: 2)
ha ha
@ -14,6 +20,17 @@ all args
echo 2+5 * 5 echo 2+5 * 5
# Keyword operators
echo 1 + 16 shl 1 == 1 + (16 shl 1)
echo 2 and 1 in {0, 30}
echo 2+2 * 2 shr 1
echo false or 2 and 1 in {0, 30}
proc `^`(a, b: int): int = a + b div 2
echo 19 mod 16 ^ 4 + 2 and 1
echo 18 mod 16 ^ 4 > 0
# echo $foo gotcha
let foo = 77 let foo = 77
echo $foo echo $foo