From f4609b896fac842433bd495c166d5987852a6a73 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sat, 21 Nov 2020 19:20:35 +0100 Subject: merge(3p/git): Merge git subtree at v2.29.2 This also bumps the stable nixpkgs to 20.09 as of 2020-11-21, because there is some breakage in the git build related to the netrc credentials helper which someone has taken care of in nixpkgs. The stable channel is not used for anything other than git, so this should be fine. Change-Id: I3575a19dab09e1e9556cf8231d717de9890484fb --- third_party/git/t/t7812-grep-icase-non-ascii.sh | 31 +++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'third_party/git/t/t7812-grep-icase-non-ascii.sh') diff --git a/third_party/git/t/t7812-grep-icase-non-ascii.sh b/third_party/git/t/t7812-grep-icase-non-ascii.sh index 0c685d35986e..03dba6685ab7 100755 --- a/third_party/git/t/t7812-grep-icase-non-ascii.sh +++ b/third_party/git/t/t7812-grep-icase-non-ascii.sh @@ -53,4 +53,35 @@ test_expect_success REGEX_LOCALE 'pickaxe -i on non-ascii' ' test_cmp expected actual ' +test_expect_success GETTEXT_LOCALE,LIBPCRE2 'PCRE v2: setup invalid UTF-8 data' ' + printf "\\200\\n" >invalid-0x80 && + echo "ævar" >expected && + cat expected >>invalid-0x80 && + git add invalid-0x80 +' + +test_expect_success GETTEXT_LOCALE,LIBPCRE2 'PCRE v2: grep ASCII from invalid UTF-8 data' ' + git grep -h "var" invalid-0x80 >actual && + test_cmp expected actual && + git grep -h "(*NO_JIT)var" invalid-0x80 >actual && + test_cmp expected actual +' + +test_expect_success GETTEXT_LOCALE,LIBPCRE2 'PCRE v2: grep non-ASCII from invalid UTF-8 data' ' + git grep -h "æ" invalid-0x80 >actual && + test_cmp expected actual && + git grep -h "(*NO_JIT)æ" invalid-0x80 >actual && + test_cmp expected actual +' + +test_expect_success GETTEXT_LOCALE,LIBPCRE2 'PCRE v2: grep non-ASCII from invalid UTF-8 data with -i' ' + test_might_fail git grep -hi "Æ" invalid-0x80 >actual && + if test -s actual + then + test_cmp expected actual + fi && + test_must_fail git grep -hi "(*NO_JIT)Æ" invalid-0x80 >actual && + ! test_cmp expected actual +' + test_done -- cgit 1.4.1