aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--bootstrap.am3
-rw-r--r--src/memory.c5
-rw-r--r--tests/testsuite.at12
3 files changed, 17 insertions, 3 deletions
diff --git a/bootstrap.am b/bootstrap.am
index 474a672..e4309bc 100644
--- a/bootstrap.am
+++ b/bootstrap.am
@@ -35,8 +35,7 @@ SUBST_MACRO = eb$<\e \
<fs@pkgdatadir^Q@\e$(pkgdatadir)\e;>j \
<fs@scitecolibdir^Q@\e$(scitecolibdir)\e;>j \
<fs@TECO_INTEGER^Q@\e@TECO_INTEGER@\e;>j \
- ^U[$$LC_ALL]C\e EG.d@DATE@ "+%d %b %Y"\e \
- <fs@DATE^Q@\e^EQ.d\e; -D>j \
+ <fs@DATE^Q@\e$(shell LC_ALL=C @DATE@ "+%d %b %Y")\e; -D>j \
ew$@\e
# The SciTECO-based substitutor must not process config.h.in.
diff --git a/src/memory.c b/src/memory.c
index 2d93b12..5958224 100644
--- a/src/memory.c
+++ b/src/memory.c
@@ -403,6 +403,11 @@ malloc_trim(size_t pad)
*
* NOTE: At least on Windows 2000, we run twice as fast than
* when polling from a dedicated thread.
+ *
+ * NOTE: On Wine, we cannot recover from hitting the memory
+ * limit, but this is probably because malloc() is actually
+ * forwarded to the glibc which needs malloc_trim().
+ * This should not be a problem on real Windows.
*/
static gsize
teco_memory_get_usage(void)
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])