From c4f3e907cdf4b20680c25b76c61845aad06f577b Mon Sep 17 00:00:00 2001 From: Freddy Vulto Date: Fri, 4 Dec 2009 22:12:54 +0100 Subject: [PATCH] (testsuite) Fix screen test Completing directories after `screen -c' passes on bash-4 now that _filedir does a `compopt -o filenames'. The test yields an expected failure on bash-3. --- test/lib/completions/screen.exp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/lib/completions/screen.exp b/test/lib/completions/screen.exp index 5d018714..1cc74fff 100644 --- a/test/lib/completions/screen.exp +++ b/test/lib/completions/screen.exp @@ -26,10 +26,13 @@ set expected {bar {bar bar.d} foo {foo.d}} send "$cmd\t" expect -ex "$cmd" expect { - -re "bar\\s+bar\\\\ bar.d\\s+foo\\s+foo.d" { pass "$test" } - # _filedir works only if `-o filenames' is in effect, which isn't the - # case for `screen' - -re "bar\\s+bar bar.d\\s+foo\\s+foo.d" { xfail "$test" } + -re "\r\nbar\\s+bar bar.d/\\s+foo\\s+foo.d/" { pass "$test" } + # Directories might not be suffixed with a slash (/). This is because + # _filedir only works if `-o filenames' is in effect, which isn't the + # case for `screen' on bash-3, so an expected failure (xfail) + -re "\r\nbar\\s+bar bar.d\\s+foo\\s+foo.d" { + if {$bash_versinfo_0 < 4} {xfail "$test"} {fail "$test"} + } -re $prompt { unresolved "$test at prompt" } default { unresolved "$test" } }; # expect