aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2021-06-06 00:02:57 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2021-06-08 18:39:16 +0200
commit12932ca20847e09be31fbce3bf029389a47b84cd (patch)
treea33c091c7f71b450dd9d008c86d13c3c2fa0acb6 /tests
parent4686d184967c0c747777c8edcc6b00dc023b8aa9 (diff)
downloadsciteco-12932ca20847e09be31fbce3bf029389a47b84cd.tar.gz
added test suite cases for memory limiting and command execution
* Turned out to be useful in debugging the "Memory limiting during spawning" test case on Windows. * Use UNIX shell emulation (0,128ED) in all test cases. Should be necessary in order to run the testsuite on Windows, but it is currently broken anyway. * avoid <EG> when preprocessing files - use GNU Make's $(shell) instead * Fixes builds on MinGW where there are still problems with <EC> and <EG> at least in the virtual build environment. * Results in a another automake warning about non-POSIX Make constructs. This is not critical since we depend on GNU Make anyway.
Diffstat (limited to 'tests')
-rw-r--r--tests/testsuite.at12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 59bd483..90c9724 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -47,6 +47,16 @@ AT_CHECK([$SCITECO -e "@EB'${srcdir}/autoeol-input.txt' EL-2\"N(0/0)' 2LR 13@I''
AT_CHECK([cmp autoeol-sciteco.txt ${srcdir}/autoeol-output.txt], 0, ignore, ignore)
AT_CLEANUP
+AT_SETUP([Memory limiting])
+# NOTE: We cannot escape [, so we have to balance it.
+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)
+AT_CLEANUP
+
AT_BANNER([Regression Tests])
AT_SETUP([Glob patterns with character classes])
@@ -71,7 +81,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 @EC'cat /dev/zero'"], 1, ignore, ignore)
+AT_CHECK([$SCITECO -e "50*1000*1000,2EJ 0,128ED @EC'cat /dev/zero'"], 1, ignore, ignore)
AT_CLEANUP
AT_BANNER([Known Bugs])