summaryrefslogtreecommitdiff
path: root/test/lib/library.exp
diff options
context:
space:
mode:
authorCrestez Dan Leonard <cdleonard@gmail.com>2010-02-02 11:16:29 +0200
committerCrestez Dan Leonard <cdleonard@gmail.com>2010-02-02 11:16:29 +0200
commitc3bb4416d71dfb73c813179e2b4a37767e5adb0d (patch)
tree2358b4832f8e40fe1ff13d3659d1edeb79ac9e3c /test/lib/library.exp
parent61f83856fb1365e8c9df525dbcc5b74708ddbfe4 (diff)
downloadbash-completion-c3bb4416d71dfb73c813179e2b4a37767e5adb0d.tar.gz
Fixed tests when BASH_COMPLETION or TESTDIR contain spaces.
Diffstat (limited to 'test/lib/library.exp')
-rw-r--r--test/lib/library.exp12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/lib/library.exp b/test/lib/library.exp
index 60062ccd..fa554c73 100644
--- a/test/lib/library.exp
+++ b/test/lib/library.exp
@@ -98,7 +98,7 @@ proc assert_bash_list_dir {expected cmd dir {test ""} {prompt /@} {size 20}} {
assert_bash_exec "cd $dir" "" $prompt
assert_bash_list $expected $cmd $test $prompt $size
sync_after_int $prompt
- assert_bash_exec "cd \$TESTDIR"
+ assert_bash_exec {cd "$TESTDIR"}
}; # assert_bash_list_dir()
@@ -268,7 +268,7 @@ proc assert_complete_dir {expected cmd dir {test ""} {size 20} {cword ""}} {
assert_bash_exec "cd $dir" "" $prompt
assert_complete $expected $cmd $test $prompt $size $cword
sync_after_int $prompt
- assert_bash_exec "cd \$TESTDIR"
+ assert_bash_exec {cd "$TESTDIR"}
}; # assert_complete_dir
@@ -631,16 +631,16 @@ proc save_env {{file ""}} {
# @param string File to save the environment to. Default is "$TESTDIR/tmp/env1~".
# @see assert_env_unmodified()
proc _save_env {{file ""}} {
- assert_bash_exec "{ set; declare -F; shopt -p; } > $file"
+ assert_bash_exec "{ set; declare -F; shopt -p; } > \"$file\""
}; # _save_env()
# Source bash_completion package
proc source_bash_completion {} {
- assert_bash_exec {BASH_COMPLETION_DIR=$(cd $TESTDIR/..; pwd)/contrib}
+ assert_bash_exec {BASH_COMPLETION_DIR=$(cd "$TESTDIR/.."; pwd)/contrib}
assert_bash_exec {BASH_COMPLETION_COMPAT_DIR=$BASH_COMPLETION_DIR}
- assert_bash_exec {BASH_COMPLETION=$(cd $TESTDIR/..; pwd)/bash_completion}
- assert_bash_exec {source $BASH_COMPLETION}
+ assert_bash_exec {BASH_COMPLETION=$(cd "$TESTDIR/.."; pwd)/bash_completion}
+ assert_bash_exec {source "$BASH_COMPLETION"}
}; # source_bash_completion()