summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2010-01-16 12:56:29 +0200
committerVille Skyttä <ville.skytta@iki.fi>2010-01-16 12:56:29 +0200
commitef7f9dc89e3db29b68df62fc37c68b6232a9263a (patch)
treeba5dd775a9289dc4737f1c98d91cf1db3cabf719
parent7a4e09a6ac294c32bc91e119e708243945024633 (diff)
downloadbash-completion-ef7f9dc89e3db29b68df62fc37c68b6232a9263a.tar.gz
(testsuite) Allow possibly leading whitespace in match_items() chunks > 1.
Thanks to Freddy Vulto.
-rw-r--r--test/lib/library.exp3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/lib/library.exp b/test/lib/library.exp
index 1da3aaf1..fe07dccf 100644
--- a/test/lib/library.exp
+++ b/test/lib/library.exp
@@ -503,7 +503,8 @@ proc match_items {items test {prompt /@} {size 20}} {
set items [bash_sort $items]
set result false
for {set i 0} {$i < [llength $items]} {set i [expr {$i + $size}]} {
- set expected ""
+ # For chunks > 1, allow leading whitespace
+ if {$i > $size} { set expected "\\s*" } else { set expected "" }
for {set j 0} {$j < $size && $i + $j < [llength $items]} {incr j} {
set item "[lindex $items [expr {$i + $j}]]"
# Escape special regexp characters