summaryrefslogtreecommitdiff
path: root/test/config
diff options
context:
space:
mode:
authorDavid Paleino <dapal@debian.org>2011-02-06 21:26:41 +0100
committerDavid Paleino <dapal@debian.org>2011-02-06 21:26:41 +0100
commit9920a8faedf704420571d8072ccab27e9dac40ba (patch)
tree733edf3b07be06c130d04aaa1884213326722cad /test/config
parentf9748115fb4b2950fb4df7535fb723c4affde078 (diff)
downloadbash-completion-9920a8faedf704420571d8072ccab27e9dac40ba.tar.gz
Imported Upstream version 1.3upstream/1.3
Diffstat (limited to 'test/config')
-rw-r--r--test/config/bashrc9
-rw-r--r--test/config/default.exp26
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"
+ }
+ }
+}