Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2016-06-25 08:22:33 +0300
committerJunio C Hamano <gitster@pobox.com>2016-07-01 22:44:57 +0300
commit9d9babb84d45234132f3cb1f4527ce1106e3d2ec (patch)
treed087573f2adde39ba70c0c864a01962fbbe8e67c /t
parente944d9d932b3653debcfdd16eec2721eed0670e5 (diff)
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')
-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 0000000000..efef7fb81f
--- /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