# Interactive: a failing line in $ENV is reported and the shell reads on; # `exit` there still ends the shell. (A ksh-only builtin in a shared # startup file must not lock the user out of their account.) command -v python3 >/dev/null 2>&1 || exit 77 printf 'set -A x -- a\nnosuchcommand\necho after-env\n' >envbad printf 'echo from-exit-file\nexit 3\n' >envexit # The two messages are prefixed with the shell's own path, which the test # cannot know, so drop those lines and compare what is left. ENV=$PWD/envbad PS1='$ ' HISTFILE='' \ python3 "$TESTS/tools/ptydrive.py" "$TSH" -i >envbad.out 2>&1 <<'END' expect after-env send echo alive\r expect alive send exit\r END grep -v -e '-A: bad option' -e 'nosuchcommand: not found' envbad.out ENV=$PWD/envexit PS1='$ ' HISTFILE='' \ python3 "$TESTS/tools/ptydrive.py" "$TSH" -i <<'END' expect from-exit-file wait 0.3 END