[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 6a6cab1179cc87eb212c9251197ff4dda7275904
Freddy Vulto
fvulto at gmail.com
Sat Apr 10 10:30:53 UTC 2010
The following commit has been merged in the master branch:
commit 3d4941fa962e083040e8afd8cb0b95e70d6d60bc
Author: Freddy Vulto <fvulto at gmail.com>
Date: Sat Apr 10 12:13:33 2010 +0200
(testsuite) Add test case for _filedir with directory containing multibyte character.
See also: http://www.mail-archive.com/bash-completion-devel@lists.alioth.debian.org/msg01942.html
diff --git a/test/fixtures/_filedir/a b/i "b/test/fixtures/_filedir/a\303\251/g"
similarity index 100%
copy from test/fixtures/_filedir/a b/i
copy to "test/fixtures/_filedir/a\303\251/g"
diff --git a/test/unit/_filedir.exp b/test/unit/_filedir.exp
index 3529f6e..204d31c 100644
--- a/test/unit/_filedir.exp
+++ b/test/unit/_filedir.exp
@@ -35,7 +35,10 @@ proc teardown {} {
assert_bash_exec {unset COMPREPLY cur}
assert_bash_exec {unset -f _f _g}
assert_bash_exec {complete -r f g}
- assert_env_unmodified { /OLDPWD/d }
+ assert_env_unmodified {
+ /OLDPWD/d
+ /OLD_CTYPE/d
+ }
}
@@ -245,4 +248,20 @@ assert_complete_dir {ee.e1 foo/ gg.e1} "g " "fixtures/_filedir/ext" $test
sync_after_int
+set test "completing f aé should return g when LC_CTYPE=C"
+# Backup/set LC_CTYPE
+assert_bash_exec {OLD_CTYPE=$LC_CTYPE; LC_CTYPE=C}
+if {[lindex $::BASH_VERSINFO 0] > 3} {
+ assert_complete_dir g "f aé/" "fixtures/_filedir"
+} else {
+ assert_complete_dir "\b\b\b\b$'a\\\\303\\\\251/g'" "f aé/" \
+ "fixtures/_filedir"
+}
+# Restore LC_CTYPE
+assert_bash_exec {[[ $OLD_CTYPE ]] && LC_CTYPE=$OLD_CTYPE || unset LC_CTYPE}
+
+
+sync_after_int
+
+
teardown
--
bash-completion
More information about the Bash-completion-commits
mailing list