From bb47efd9b6d5717434d4d85c4a31bcd6787def97 Mon Sep 17 00:00:00 2001 From: Freddy Vulto Date: Sun, 4 Oct 2009 18:18:29 +0200 Subject: [PATCH] (testsuite) Allow trailing space on one completion Within `match_items', if only one completion is generated, an (optional) trailing space is allowed, because -o nospace might not be in effect. --- test/lib/library.exp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/lib/library.exp b/test/lib/library.exp index 4ca6b96c..05259d30 100644 --- a/test/lib/library.exp +++ b/test/lib/library.exp @@ -383,7 +383,8 @@ proc match_items {items test {size 20}} { }; # for if {[llength $items] == 1} { expect { - -re "^$expected$" { set result true } + # NOTE: The optional space ( ?) depends on whether -o nospace is active + -re "^$expected ?$" { set result true } "\r\n" { set result false; break } default { set result false; break } timeout { set result false; break }