diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2016-06-25 07:22:33 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-07-01 12:44:57 -0700 |
commit | 9d9babb84d45234132f3cb1f4527ce1106e3d2ec (patch) | |
tree | d087573f2adde39ba70c0c864a01962fbbe8e67c /t | |
parent | e944d9d932b3653debcfdd16eec2721eed0670e5 (diff) | |
download | git-9d9babb84d45234132f3cb1f4527ce1106e3d2ec.tar.gz git-9d9babb84d45234132f3cb1f4527ce1106e3d2ec.tar.xz |
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-x | t/t7813-grep-icase-iso.sh | 19 |
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 000000000..efef7fb81 --- /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 |