diff options
Diffstat (limited to 'test/config')
| -rw-r--r-- | test/config/bashrc | 9 | ||||
| -rw-r--r-- | test/config/default.exp | 26 |
2 files changed, 16 insertions, 19 deletions
diff --git a/test/config/bashrc b/test/config/bashrc index ddf06339..fd72b816 100644 --- a/test/config/bashrc +++ b/test/config/bashrc @@ -7,13 +7,12 @@ set -o posix # Unset `command_not_found_handle' as defined on Debian/Ubuntu, because this # troubles and slows down testing unset -f command_not_found_handle - # Set prompt to ignore current root directory; display path starting - # from here. E.g. prompt: /fixtures/@ + # Set fixed prompt `/@' TESTDIR=$(pwd) -export PS1='$(wd=$(pwd); echo ${wd#$TESTDIR}/)@' +export PS1='/@' export PS2='> ' # Configure readline -export INPUTRC=$TESTDIR/config/inputrc +export INPUTRC=$SRCDIR/config/inputrc # When not running via cron, avoid escape junk at beginning of line from # readline, see e.g. http://bugs.gentoo.org/246091 [ "$CRON" ] || export TERM=dummy @@ -31,7 +30,7 @@ unset -v \ COMP_TAR_INTERNAL_PATHS # Load bash testsuite helper functions -. lib/library.sh +. $SRCDIR/lib/library.sh # Local variables: # mode: shell-script diff --git a/test/config/default.exp b/test/config/default.exp index d1c04e71..1eb47a2c 100644 --- a/test/config/default.exp +++ b/test/config/default.exp @@ -1,23 +1,21 @@ - # Set default expect fallback routines +# Set default expect fallback routines expect_after { eof { if {[info exists test]} { fail "$test at eof" - } else { + } elseif {[info level] > 0} { fail "[info level 1] at eof" - }; # if - }; # eof + } else { + fail "eof" + } + } timeout { if {[info exists test]} { fail "$test at timeout" - } else { + } elseif {[info level] > 0} { fail "[info level 1] at timeout" - }; # if - }; # timeout -}; # expect_after() - - - # Call tool_start(), if available -if { [info procs "${tool}_start"] != "" } { - ${tool}_start -}; # if + } else { + fail "timeout" + } + } +} |
