summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorIgor Murzov <e-mail@date.by>2011-06-26 03:38:20 +0400
committerIgor Murzov <e-mail@date.by>2011-06-26 04:04:53 +0400
commitb13ee019d0eed45107aefdbe550c52aaef2bcc93 (patch)
tree2cf84870f92548fb1d9ef2617e0a1f591bb33922 /test
parent17a316bfca13dcbd7ac432dc368ef18b35494616 (diff)
downloadbash-completion-b13ee019d0eed45107aefdbe550c52aaef2bcc93.tar.gz
make completions that use _command also work with file names
Diffstat (limited to 'test')
-rw-r--r--test/lib/completions/time.exp18
1 files changed, 17 insertions, 1 deletions
diff --git a/test/lib/completions/time.exp b/test/lib/completions/time.exp
index 3bed4fdf..d052458c 100644
--- a/test/lib/completions/time.exp
+++ b/test/lib/completions/time.exp
@@ -4,7 +4,7 @@ proc setup {} {
proc teardown {} {
- assert_env_unmodified
+ assert_env_unmodified {/OLDPWD=/d}
}
@@ -17,4 +17,20 @@ assert_complete_any "time set"
sync_after_int
+set test "-p find -typ should complete find's options"
+assert_complete "-type" "time -p find -typ" $test
+
+
+sync_after_int
+
+
+set test "it should be possible to complete file paths"
+set dir $::srcdir/fixtures/shared
+set files [split [exec bash -c "cd $dir/bin && ls -p"] "\n"]
+assert_complete_dir $files "time ./bin/" $dir $test
+
+
+sync_after_int
+
+
teardown