diff --git a/src/tests.sh b/src/tests.sh index e65e84a..a143e79 100755 --- a/src/tests.sh +++ b/src/tests.sh @@ -99,7 +99,7 @@ check "BinaryReturn" "0b011010011010011" "13523" title "Arithmetic" check "Addition" "(+ 1093 102852)" "103945" -check "Multiply" "(*1000 10000)" "10000000" +check "Multiply" "(* 1000 10000)" "10000000" check "Division" "(/ 6418425 65)" "98745" check "ChainAdd" "(+ 3917 17304 1293844 400 100000)" "1415465" check "ChainMul" "(* 8263 23 123)" "23376027" @@ -154,9 +154,8 @@ for _ in {0..25}; do deep_nesting="( $deep_nesting )"; done check "DeepNesting" "$deep_nesting" "$deep_nesting" # Above 25 it starts to stack-smash title "Spacing" -check "DenseSpc" "(+1093 102852)" "103945" -check "WideSpac" "( + 1093 102852 )" "103945" -check "VWidwSpc" " ( + 1093 102852 ) " "103945" +check "Wide Spacing" "( + 1093 102852 )" "103945" +check "Very Wide Spacing" " ( + 1093 102852 ) " "103945" title "DemoFunctions" check "Squaring" "(sq 9876)" "97535376" @@ -188,7 +187,7 @@ check "Factorial" "\ )));\ (fac 11)" "39916800" check "LambdaClone" "(def y (fn (a) (* 10 a))) (def b y) (def y 12345) ((b 5) y)" "( 50 12345 )" -check "Duplicate" "(def dupe (fn (a) (() (a a a))));(dupe (*10 10))" "( 100 100 100 )" +check "Duplicate" "(def dupe (fn (a) (() (a a a))));(dupe (* 10 10))" "( 100 100 100 )" title "Cat" check "ExplicitCat" '(cat "Big" " Kitty")' "Big Kitty" diff --git a/src/tokens.c b/src/tokens.c index 58abe4d..558b917 100644 --- a/src/tokens.c +++ b/src/tokens.c @@ -14,7 +14,7 @@ */ // Is the char a standalone token? -static const char singleTokens[] = "()+-*/='?."; +static const char singleTokens[] = "()'?."; int isSingle(const char c) {