1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

tests/pty.sh: fix regress fail due to $TMPDIR

Test 137(C) was failing on some systems because $TMPDIR was set and
the local vi(1) honours it, so that the expected '/tmp/' string was
never output by vi. For compatibility with vi programs that honour
$TMPDIR and those that always use /tmp, we must export TMPDIR=/tmp.

src/cmd/ksh93/tests/pty.sh:

- Export TMPDIR=/tmp for test 137(C).
     Note that this exports TMPDIR to the environment for the
  duration of the 'tst' function run because the function was
  defined using the ksh 'function tst { ...; }' syntax.
This commit is contained in:
Martijn Dekker 2020-06-13 01:48:13 +02:00
parent 881a5be07c
commit 289f56cd4c

View file

@ -19,6 +19,13 @@
######################################################################## ########################################################################
: : generated by mkptytests from "posix-sh-*-c.pty" : : : : generated by mkptytests from "posix-sh-*-c.pty" : :
# These are tests for the interactive shell, run in a pseudoterminal utility
# called 'pty', which allows for scripting interactive sessions and which is
# installed in arch/*/bin while building. To understand these tests, first
# read the pty manual by running: arch/*/bin/pty --man
# The # err_exit # comments are to enable shtests to count the tests.
# the trickiest part of the tests is avoiding typeahead # the trickiest part of the tests is avoiding typeahead
# in the pty dialogue # in the pty dialogue
@ -363,7 +370,7 @@ r history
! !
# err_exit # # err_exit #
tst $LINENO <<"!" TMPDIR=/tmp tst $LINENO <<"!"
L POSIX sh 137(C) L POSIX sh 137(C)
# If the User Portability Utilities Option is supported and shell # If the User Portability Utilities Option is supported and shell