summaryrefslogtreecommitdiff
path: root/t/t7813-grep-icase-iso.sh
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2016-06-25 05:22:33 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-07-01 19:44:57 (GMT)
commit9d9babb84d45234132f3cb1f4527ce1106e3d2ec (patch)
treed087573f2adde39ba70c0c864a01962fbbe8e67c /t/t7813-grep-icase-iso.sh
parente944d9d932b3653debcfdd16eec2721eed0670e5 (diff)
downloadgit-9d9babb84d45234132f3cb1f4527ce1106e3d2ec.zip
git-9d9babb84d45234132f3cb1f4527ce1106e3d2ec.tar.gz
git-9d9babb84d45234132f3cb1f4527ce1106e3d2ec.tar.bz2
grep/pcre: prepare locale-dependent tables for icase matching
The default tables are usually built with C locale and only suitable for LANG=C or similar. This should make case insensitive search work correctly for all single-byte charsets. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7813-grep-icase-iso.sh')
-rwxr-xr-xt/t7813-grep-icase-iso.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t7813-grep-icase-iso.sh b/t/t7813-grep-icase-iso.sh
new file mode 100755
index 0000000..efef7fb
--- /dev/null
+++ b/t/t7813-grep-icase-iso.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+test_description='grep icase on non-English locales'
+
+. ./lib-gettext.sh
+
+test_expect_success GETTEXT_ISO_LOCALE 'setup' '
+ printf "TILRAUN: Hall Heimur!" >file &&
+ git add file &&
+ LC_ALL="$is_IS_iso_locale" &&
+ export LC_ALL
+'
+
+test_expect_success GETTEXT_ISO_LOCALE,LIBPCRE 'grep pcre string' '
+ git grep --perl-regexp -i "TILRAUN: H.ll Heimur!" &&
+ git grep --perl-regexp -i "TILRAUN: H.LL HEIMUR!"
+'
+
+test_done