aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/atlocal.in
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2025-05-13 23:28:36 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2025-05-13 23:28:36 +0300
commite8cc15b01976d2c35751e82f2f045b45415293f9 (patch)
tree5a98c1fb70dc642a61ab35cff84112d2b380082d /tests/atlocal.in
parent8ec236b000a6b17488dda64587eaeb81db84bdf3 (diff)
downloadsciteco-e8cc15b01976d2c35751e82f2f045b45415293f9.tar.gz
revised test suite: got rid of most escaping for the TECO code snippets
* Test cases where hard to read since there was a layer of shell and M4 escaping -- sometimes with the help of quadrigraphs -- to preserve the original TECO characters. * We introduced TE_CHECK() and TE_CHECK_CMDLINE() M4 macros which care about shell escaping automatically. * If all TECO code is double quoted with [[ and ]], single square and round brackets are preserved as well. * Only in case of using *unbalanced* single square brackets, you have to take action and add `![!` or `!]!` TECO comments to balance them out. This is still better than quadrigraphs. * The $ESCAPE and $RUBOUT environment variables are replaced by equivalent M4 macros, so they can be used with TE_CHECK_CMDLINE(). * Other references to shell variables have been resolved by exporting them into the environment (as in the case of $srcdir) or by introducing new M4 macros (TE_MAXINTxx, TE_MININTxx). * The $WORDS_EXAMPLE variable has been got rid of by writing it into a temporary file instead. There is some redundancy -- in principle an M4 macro could have also been used. * This leaves only 6 remaining usages of AT_CHECK() for invoking SciTECO, mainly for testing opener.tes, where we have to pass in command line arguments. In theory most of them could be avoided as well by preparing the unnamed buffer appropriately. However the way that command line parameters are passed will be changed sooner or later. * This uses GNU M4 extensions, but Autoconf requires that anyway.
Diffstat (limited to 'tests/atlocal.in')
-rw-r--r--tests/atlocal.in23
1 files changed, 3 insertions, 20 deletions
diff --git a/tests/atlocal.in b/tests/atlocal.in
index 1c4ca89..c693cc9 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -10,28 +10,14 @@ if [ $at_arg_valgrind != false ]; then
SCITECO="valgrind --tool=memcheck --leak-check=full --error-exitcode=66 $SCITECO"
fi
-# For testing command-line editing:
-SCITECO_CMDLINE="$SCITECO --no-profile --fake-cmdline"
-
-# Control characters for testing immediate editing commands with $SCITECO_CMDLINE.
-# Often, we can use {...} for testing rubout, but sometimes this is not enough.
-# Directly embedding escapes into strings is not portable.
-# Theoretically, we could directly embed control codes, but for the time being
-# I am trying to keep non-TECO sources clean of non-printable characters.
-RUBOUT=`printf '\8'`
-RUBOUT_WORD=`printf '\27'`
-ESCAPE=`printf '\33'`
-
# Make sure that the standard library from the source package
# is used.
export SCITECOPATH="@abs_top_srcdir@/lib"
-TECO_INTEGER=@TECO_INTEGER@
+# Some test cases may access files from the tests/ source directory.
+export srcdir
-MAXINT32=2147483647
-MININT32=-2147483648
-MAXINT64=9223372036854775807
-MININT64=-9223372036854775808
+TECO_INTEGER=@TECO_INTEGER@
GREP="@GREP@"
@@ -54,6 +40,3 @@ esac
# Some platforms allow very large stack sizes, making it hard to test
# against potential stack overflows.
ulimit -s 8192
-
-# Test strings used by multiple test cases
-WORDS_EXAMPLE="navigating (words is useful"