aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/testsuite.at14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 293bc9b..897b4f4 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -44,6 +44,13 @@ m4_define([TE_MODIFIER], [m4_format([%c], 7)])
AT_BANNER([Language features])
+AT_SETUP([Number constants])
+TE_CHECK([[23:=]], 0, [23], ignore)
+TE_CHECK([[1 2= =]], 0, ignore, ignore)
+TE_CHECK([[033-27"N(0/0)']], 0, ignore, ignore)
+TE_CHECK([[@0ff-255"N(0/0)']], 0, ignore, ignore)
+AT_CLEANUP
+
AT_SETUP([Number stack])
TE_CHECK([[2%a,%a - 3"N(0/0)' $]], 0, ignore, ignore)
# It's not quite clear what would be the best semantics for comma:
@@ -66,6 +73,8 @@ AT_CLEANUP
AT_SETUP([Radix])
TE_CHECK([[0^R]], 1, ignore, ignore)
TE_CHECK([[0U.^R]], 1, ignore, ignore)
+# non-binary digits:
+TE_CHECK([[2^R 23=]], 1, ignore, ignore)
TE_CHECK([[23 (2^R)\^D .-5"N(0/0)']], 0, ignore, ignore)
AT_CLEANUP
@@ -693,6 +702,11 @@ TE_CHECK_CMDLINE([[0@W{-D}C]], 0, ignore, stderr)
AT_FAIL_IF([! $GREP "^Error:" stderr])
AT_CLEANUP
+AT_SETUP([Rub out radix change])
+TE_CHECK_CMDLINE([[10Ur ^O{-2D} ^R-Qr"N(0/0)']], 0, ignore, stderr)
+AT_FAIL_IF([$GREP "^Error:" stderr])
+AT_CLEANUP
+
AT_SETUP([Rub out stack operations in macro calls])
# This was causing memory corruptions, that would at least show up under Valgrind.
TE_CHECK_CMDLINE([[@^Um{[.a].b}Mm{-2D}]], 0, ignore, stderr)