From a61a81ec33188e8e93ec02912c60053107ae0485 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Fri, 22 Nov 2024 17:47:51 +0300 Subject: disallow setting the radix to values lower than 2 * This would actually causes crashes when trying to format numbers. * The ^R local register has a custom set_integer() method now, so that the check is performed also when using nU.^X. --- tests/testsuite.at | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') diff --git a/tests/testsuite.at b/tests/testsuite.at index 22f14e2..31ce257 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -33,6 +33,12 @@ AT_CHECK([$SCITECO -e "(1,) \"~|(0/0)'"], 0, ignore, ignore) AT_CHECK([$SCITECO -e "1,(2)=="], 0, ignore, ignore) AT_CLEANUP +AT_SETUP([Radix]) +AT_CHECK([$SCITECO -e "0^R"], 1, ignore, ignore) +AT_CHECK([$SCITECO -e "0U.^R"], 1, ignore, ignore) +AT_CHECK([$SCITECO -e "23 (2^R)\^D .-5\"N(0/0)"], 0, ignore, ignore) +AT_CLEANUP + AT_SETUP([Exponentiation]) AT_CHECK([$SCITECO -e "-1^*0 - (-1)\"N(0/0)'"], 0, ignore, ignore) AT_CHECK([$SCITECO -e "-1^*-5 - (-1)\"N(0/0)'"], 0, ignore, ignore) -- cgit v1.2.3