summaryrefslogtreecommitdiff
path: root/test/lib
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2010-01-16 16:06:48 +0200
committerVille Skyttä <ville.skytta@iki.fi>2010-01-16 17:30:02 +0200
commitf8eec776e20cf30cbe220c278b9d8ca2b9813336 (patch)
treebf3ab5413bd356dbd88d4b7be8057c4ed1cb1e34 /test/lib
parentf0c717b2be2373e8929975c9bbd3946df53ec041 (diff)
downloadbash-completion-f8eec776e20cf30cbe220c278b9d8ca2b9813336.tar.gz
Weed out look completions not starting with current word.
Some versions of the default word list for look may return non-completable entries (e.g. due to sort order mismatch -- dictionary vs non-dictionary one, case sensitivity etc -- between sort order in default word list and look's defaults). As a side effect, fixes also the test case when a lot of words are returned.
Diffstat (limited to 'test/lib')
-rw-r--r--test/lib/completions/look.exp4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/lib/completions/look.exp b/test/lib/completions/look.exp
index 4224c32d..53a3c464 100644
--- a/test/lib/completions/look.exp
+++ b/test/lib/completions/look.exp
@@ -11,7 +11,9 @@ proc teardown {} {
setup
-assert_complete_any "look foo"
+if {[assert_exec {look foo | grep ^foo} words]} {
+ assert_complete $words "look foo"
+}; # if
sync_after_int