aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2021-06-10 04:22:56 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2021-10-08 22:11:22 +0200
commitfd2390e7f1f78da4decb34edfe1f2a783b817b15 (patch)
treef7d3a5c80dce86658954e6a1cf277d26e13da3f2 /tests
parent535c9e63afa226e334bf7e3e2835dc130e853dee (diff)
downloadsciteco-fd2390e7f1f78da4decb34edfe1f2a783b817b15.tar.gz
Fixed testsuite on Mac OS: `echo -n` is apparently not supported on whatever $SHELL they execute the testsuite in
* instead, we now use `dd`.
Diffstat (limited to 'tests')
-rw-r--r--tests/testsuite.at11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 90c9724..3fc7650 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -38,7 +38,7 @@ AT_CHECK([$SCITECO -e '0U.[[AB]]'], 0, ignore, ignore)
AT_CLEANUP
AT_SETUP([8-bit cleanlyness])
-AT_CHECK([$SCITECO -e "0:@EUa/f^@^@/ :Qa-4\"N(0/0)' GaZ-4\"N(0/0)'"], 0, ignore, ignore)
+AT_CHECK([$SCITECO -e "0:@EUa/f^@^@/ :Qa-4\"N(0/0)' Ga Z= Z-4\"N(0/0)'"], 0, ignore, ignore)
AT_CLEANUP
AT_SETUP([Automatic EOL normalization])
@@ -53,8 +53,11 @@ AT_CHECK([$SCITECO -e "50*1000*1000,2EJ <[[a> !]]!"], 1, ignore, ignore)
AT_CLEANUP
AT_SETUP([Execute external command])
-AT_CHECK([$SCITECO -e "@EC'echo -n 0123456789' Z-10\"N(0/0)'"], 0, ignore, ignore)
-AT_CHECK([$SCITECO -e "0,128ED @EC'echo -n 0123456789' Z-10\"N(0/0)'"], 0, ignore, ignore)
+# TODO: It would be a better test to generate a random number of bytes.
+# Unfortunately, neither $RANDOM, shuf nor jot are portable.
+# So we have to wait until SciTECO supports a random number generator.
+AT_CHECK([$SCITECO -e "@EC'dd if=/dev/zero bs=512 count=1' Z= Z-512\"N(0/0)'"], 0, ignore, ignore)
+AT_CHECK([$SCITECO -e "0,128ED @EC'dd if=/dev/zero bs=512 count=1' Z= Z-512\"N(0/0)'"], 0, ignore, ignore)
AT_CLEANUP
AT_BANNER([Regression Tests])
@@ -81,7 +84,7 @@ AT_CLEANUP
AT_SETUP([Memory limiting during spawning])
# This might result in an OOM if memory limiting is not working
-AT_CHECK([$SCITECO -e "50*1000*1000,2EJ 0,128ED @EC'cat /dev/zero'"], 1, ignore, ignore)
+AT_CHECK([$SCITECO -e "50*1000*1000,2EJ 0,128ED @EC'dd if=/dev/zero'"], 1, ignore, ignore)
AT_CLEANUP
AT_BANNER([Known Bugs])