diff options
| author | David Bremner <david@tethera.net> | 2016-10-22 12:44:39 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2016-10-22 12:44:39 -0300 |
| commit | d93e9cee13ef22c5dbba44f33357fd969b8ef88f (patch) | |
| tree | 7d144e171209598c4ffde4512d10be72aa13750e /test | |
| parent | 9dea5b8804a43d27f8edb452957ec44b77bd155c (diff) | |
| parent | 4f032e788af2227d3e857af24f072b5bac69717c (diff) | |
Merge in test-suite, docstring fixes, release prep
Diffstat (limited to 'test')
| -rw-r--r-- | test/test-lib.sh | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/test/test-lib.sh b/test/test-lib.sh index bda8a80a..e7b83392 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -55,9 +55,15 @@ export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }' # Keep the original TERM for say_color and test_emacs ORIGINAL_TERM=$TERM -# dtach(1) provides more capable terminal environment to anything -# that requires more than dumb terminal... -[ x"${TERM:-dumb}" = xdumb ] && DTACH_TERM=vt100 || DTACH_TERM=$TERM +# Set SMART_TERM to vt100 for known dumb/unknown terminal. +# Otherwise use whatever TERM is currently used so that +# users' actual TERM environments are being used in tests. +case ${TERM-} in + '' | dumb | unknown ) + SMART_TERM=vt100 ;; + *) + SMART_TERM=$TERM ;; +esac # For repeatability, reset the environment to known value. LANG=C @@ -1168,10 +1174,10 @@ test_emacs () { fi server_name="notmuch-test-suite-$$" # start a detached session with an emacs server - # user's TERM (or 'vt100' in case user's TERM is unset, empty - # or 'dumb') is given to dtach which assumes a minimally + # user's TERM (or 'vt100' in case user's TERM is known dumb + # or unknown) is given to dtach which assumes a minimally # VT100-compatible terminal -- and emacs inherits that - TERM=$DTACH_TERM dtach -n "$TEST_TMPDIR/emacs-dtach-socket.$$" \ + TERM=$SMART_TERM dtach -n "$TEST_TMPDIR/emacs-dtach-socket.$$" \ sh -c "stty rows 24 cols 80; exec '$TMP_DIRECTORY/run_emacs' \ --no-window-system \ $load_emacs_tests \ |
