summaryrefslogtreecommitdiff
path: root/test/config
diff options
context:
space:
mode:
authorGabriel F. T. Gomes <gabriel@inconstante.net.br>2020-01-24 19:24:09 -0300
committerGabriel F. T. Gomes <gabriel@inconstante.net.br>2020-01-24 19:24:09 -0300
commit019f3cc463db63abc6460f97deb488deec43840b (patch)
tree08cd5387d6c8af6f688d6468c7e2ae9f25c449be /test/config
parent5732da2af736c40cf693354485446ab4867ecb4d (diff)
downloadbash-completion-019f3cc463db63abc6460f97deb488deec43840b.tar.gz
New upstream version 2.10upstream/2.10
Diffstat (limited to 'test/config')
-rw-r--r--test/config/bashrc44
1 files changed, 28 insertions, 16 deletions
diff --git a/test/config/bashrc b/test/config/bashrc
index 69098e14..dad96335 100644
--- a/test/config/bashrc
+++ b/test/config/bashrc
@@ -1,38 +1,50 @@
-# bashrc file for DejaGnu testsuite
+# 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().
+# library.exp's start_bash() and conftest.py.
- # Use emacs key bindings
+# Use emacs key bindings
set -o emacs
- # Use bash strict mode
+
+# 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 `command_not_found_handle' as defined on Debian/Ubuntu, because this
+# troubles and slows down testing
unset -f command_not_found_handle
+
TESTDIR=$(pwd)
+
export PS2='> '
- # Also test completions of system administrator commands, which are
- # installed via the same PATH expansion in `bash_completion.have()'
+
+# 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
- # ...as well as games on some systems not in PATH by default:
+
+# ...as well as games on some systems not in PATH by default:
export PATH=$PATH:/usr/games:/usr/local/games
- # For clean test state, avoid sourcing user's ~/.bash_completion
+
+# For clean test state, avoid sourcing user's ~/.bash_completion
export BASH_COMPLETION_USER_FILE=/dev/null
- # ...and avoid stuff in BASH_COMPLETION_USER_DIR overriding in-tree
- # completions. The user dir is first in the lookup path, so this should also
- # give precedence to the in-tree "completions" dir over other ones, e.g.
- # the one possibly in /usr/share/bash-completion.
+
+# ...and avoid stuff in BASH_COMPLETION_USER_DIR and system install locations
+# overriding in-tree completions. Setting the user dir would otherwise suffice,
+# 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)
+# /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
- # Make sure default settings are in effect
+# 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
+# Load bash testsuite helper functions
. $SRCDIR/lib/library.sh
# Local variables: