diff options
author | David Paleino <dapal@debian.org> | 2010-06-16 18:20:29 +0200 |
---|---|---|
committer | David Paleino <dapal@debian.org> | 2010-06-16 18:20:29 +0200 |
commit | f9748115fb4b2950fb4df7535fb723c4affde078 (patch) | |
tree | 20875f42b219a5d56e8a7e98840f6dbced003ae0 /test/config | |
parent | e5a9b6220e93ca656fd9774c6aefa78241edca6f (diff) | |
download | bash-completion-f9748115fb4b2950fb4df7535fb723c4affde078.tar.gz |
Imported Upstream version 1.2upstream/1.2
Diffstat (limited to 'test/config')
-rw-r--r-- | test/config/bashrc | 42 | ||||
-rw-r--r-- | test/config/default.exp | 23 | ||||
-rw-r--r-- | test/config/inputrc | 21 |
3 files changed, 86 insertions, 0 deletions
diff --git a/test/config/bashrc b/test/config/bashrc new file mode 100644 index 00000000..ddf06339 --- /dev/null +++ b/test/config/bashrc @@ -0,0 +1,42 @@ +# bashrc file for DejaGnu testsuite + + # Use emacs key bindings +set -o emacs + # Use bash strict mode +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/@ +TESTDIR=$(pwd) +export PS1='$(wd=$(pwd); echo ${wd#$TESTDIR}/)@' +export PS2='> ' + # Configure readline +export INPUTRC=$TESTDIR/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 + # Ensure enough columns so expect doesn't have to care about line breaks +stty columns 150 + # Also test completions of system administrator commands, which are + # installed via the same PATH expansion in `bash_completion.have()' +export PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin + + # Make sure default settings are in effect +unset -v \ + COMP_CONFIGURE_HINTS \ + COMP_CVS_REMOTE \ + COMP_KNOWN_HOSTS_WITH_HOSTFILE \ + COMP_TAR_INTERNAL_PATHS + + # Load bash testsuite helper functions +. lib/library.sh + +# Local variables: +# mode: shell-script +# sh-basic-offset: 4 +# sh-indent-comment: t +# indent-tabs-mode: nil +# End: +# ex: ts=4 sw=4 et filetype=sh diff --git a/test/config/default.exp b/test/config/default.exp new file mode 100644 index 00000000..d1c04e71 --- /dev/null +++ b/test/config/default.exp @@ -0,0 +1,23 @@ + # Set default expect fallback routines +expect_after { + eof { + if {[info exists test]} { + fail "$test at eof" + } else { + fail "[info level 1] at eof" + }; # if + }; # eof + timeout { + if {[info exists test]} { + fail "$test at timeout" + } else { + fail "[info level 1] at timeout" + }; # if + }; # timeout +}; # expect_after() + + + # Call tool_start(), if available +if { [info procs "${tool}_start"] != "" } { + ${tool}_start +}; # if diff --git a/test/config/inputrc b/test/config/inputrc new file mode 100644 index 00000000..33134da6 --- /dev/null +++ b/test/config/inputrc @@ -0,0 +1,21 @@ +# Readline init file for DejaGnu testsuite +# See: info readline + + # Press TAB once (instead of twice) to auto-complete +set show-all-if-ambiguous on + # No bell. No ^G in output +set bell-style none + # Don't query user about viewing the number of possible completions +set completion-query-items -1 + # Display completions sorted horizontally, not vertically +set print-completions-horizontally on + # Don't use pager when showing completions +set page-completions off + +# Local variables: +# mode: shell-script +# sh-basic-offset: 4 +# sh-indent-comment: t +# indent-tabs-mode: nil +# End: +# ex: ts=4 sw=4 et filetype=sh |