From 20f7d5c1d20bd723ebe30405d1e6d7c8d65b466c Mon Sep 17 00:00:00 2001 From: Freddy Vulto Date: Tue, 26 Oct 2010 22:41:01 +0200 Subject: [PATCH] (testsuite) Improve _filedir unicode test (Alioth #312477) --- test/unit/_filedir.exp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/test/unit/_filedir.exp b/test/unit/_filedir.exp index a7202b27..a1757a84 100644 --- a/test/unit/_filedir.exp +++ b/test/unit/_filedir.exp @@ -248,10 +248,17 @@ assert_complete_dir {ee.e1 foo/ gg.e1 ii.E1} "g " "fixtures/_filedir/ext" $test sync_after_int -# Execute this test only when LC_CTYPE matches *UTF-8* -if {[string first "UTF-8" $::LC_CTYPE] != -1} { - set test "completing f aé should return g" +set test "completing f aé should return g when LC_CTYPE=C" +# Execute this test only on bash >= 4 with LC_CTYPE matching *UTF-8* +# See also: http://www.mail-archive.com/bash-completion-devel\ +# @lists.alioth.debian.org/msg02265.html +if { + [lindex $::BASH_VERSINFO 0] >= 4 && + [string first "UTF-8" $::LC_CTYPE] != -1 +} { assert_complete_dir g "f aé/" "fixtures/_filedir" +} else { + unsupported "$test" }