From 95623d39d6029ba78ec96ad5ea08e9ac12629b91 Mon Sep 17 00:00:00 2001 From: "Gabriel F. T. Gomes" Date: Mon, 3 Aug 2020 18:43:13 -0300 Subject: New upstream version 2.11 --- test/config/bashrc | 17 +++++++++++++---- test/config/default.exp | 21 --------------------- test/config/inputrc | 18 +++++++++++------- 3 files changed, 24 insertions(+), 32 deletions(-) delete mode 100644 test/config/default.exp (limited to 'test/config') diff --git a/test/config/bashrc b/test/config/bashrc index dad96335..141dddc5 100644 --- a/test/config/bashrc +++ b/test/config/bashrc @@ -1,7 +1,7 @@ # bashrc file for bash-completion test suite # Note that we do some initialization that would be too late to do here in -# library.exp's start_bash() and conftest.py. +# conftest.py. # Use emacs key bindings set -o emacs @@ -9,6 +9,9 @@ set -o emacs # Use bash strict mode set -o posix +# Raise error on uninitialized variables +set -o nounset + # Unset `command_not_found_handle' as defined on Debian/Ubuntu, because this # troubles and slows down testing unset -f command_not_found_handle @@ -32,7 +35,10 @@ export BASH_COMPLETION_USER_FILE=/dev/null # but simple xspec completions are only installed if a separate one is not # found in any completion dirs. Therefore we also point the "system" dirs to # locations that should not yield valid completions and helpers paths either. -export BASH_COMPLETION_USER_DIR=$(cd "$SRCDIR/.."; pwd) +export BASH_COMPLETION_USER_DIR=$( + cd "$SRCDIR/.." || exit 1 + pwd +) # /var/empty isn't necessarily actually always empty :P export BASH_COMPLETION_COMPAT_DIR=/var/empty/bash_completion.d export XDG_DATA_DIRS=/var/empty @@ -44,8 +50,11 @@ unset -v \ COMP_KNOWN_HOSTS_WITH_HOSTFILE \ COMP_TAR_INTERNAL_PATHS -# Load bash testsuite helper functions -. $SRCDIR/lib/library.sh +# @param $1 Char to add to $COMP_WORDBREAKS +add_comp_wordbreak_char() +{ + [[ "${COMP_WORDBREAKS//[^$1]/}" ]] || COMP_WORDBREAKS+=$1 +} # Local variables: # mode: shell-script diff --git a/test/config/default.exp b/test/config/default.exp deleted file mode 100644 index 246499b4..00000000 --- a/test/config/default.exp +++ /dev/null @@ -1,21 +0,0 @@ -# Set default expect fallback routines -expect_after { - eof { - if {[info exists test]} { - fail "$test at eof" - } elseif {[info level] > 0} { - fail "[info level 1] at eof" - } else { - fail "eof" - } - } - timeout { - if {[info exists test]} { - fail "$test at timeout" - } elseif {[info level] > 0} { - fail "[info level 1] at timeout" - } else { - fail "timeout" - } - } -} diff --git a/test/config/inputrc b/test/config/inputrc index 5992491a..da896f56 100644 --- a/test/config/inputrc +++ b/test/config/inputrc @@ -1,17 +1,21 @@ -# Readline init file for DejaGnu testsuite +# Readline init file for bash-completion test suite # See: info readline - # Press TAB once (instead of twice) to auto-complete +# Press TAB once (instead of twice) to auto-complete set show-all-if-ambiguous on - # No bell. No ^G in output + +# No bell. No ^G in output set bell-style none - # Don't query user about viewing the number of possible completions + +# 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 + +# Don't use pager when showing completions set page-completions off +# Print each completion on its own line +set completion-display-width 0 + # Local variables: # mode: shell-script # End: -- cgit v1.2.1