1#!/bin/sh23test_description='grep icase on non-English locales'45. ./lib-gettext.sh67test_expect_success GETTEXT_LOCALE 'setup' '8test_write_lines "TILRAUN: Halló Heimur!" >file &&9git add file &&10LC_ALL="$is_IS_locale" &&11export LC_ALL12'1314test_have_prereq GETTEXT_LOCALE &&15test-tool regex "HALLÓ" "Halló" ICASE &&16test_set_prereq REGEX_LOCALE1718test_expect_success REGEX_LOCALE 'grep literal string, no -F' '19git grep -i "TILRAUN: Halló Heimur!" &&20git grep -i "TILRAUN: HALLÓ HEIMUR!"21'2223test_expect_success GETTEXT_LOCALE,PCRE 'grep pcre utf-8 icase' '24git grep --perl-regexp "TILRAUN: H.lló Heimur!" &&25git grep --perl-regexp -i "TILRAUN: H.lló Heimur!" &&26git grep --perl-regexp -i "TILRAUN: H.LLÓ HEIMUR!"27'2829test_expect_success GETTEXT_LOCALE,PCRE 'grep pcre utf-8 string with "+"' '30test_write_lines "TILRAUN: Hallóó Heimur!" >file2 &&31git add file2 &&32git grep -l --perl-regexp "TILRAUN: H.lló+ Heimur!" >actual &&33echo file >expected &&34echo file2 >>expected &&35test_cmp expected actual36'3738test_expect_success REGEX_LOCALE 'grep literal string, with -F' '39git grep -i -F "TILRAUN: Halló Heimur!" &&40git grep -i -F "TILRAUN: HALLÓ HEIMUR!"41'4243test_expect_success REGEX_LOCALE 'grep string with regex, with -F' '44test_write_lines "TILRAUN: Halló Heimur [abc]!" >file3 &&45git add file3 &&46git grep -i -F "TILRAUN: Halló Heimur [abc]!" file347'4849test_expect_success REGEX_LOCALE 'pickaxe -i on non-ascii' '50git commit -m first &&51git log --format=%f -i -S"TILRAUN: HALLÓ HEIMUR!" >actual &&52echo first >expected &&53test_cmp expected actual54'5556test_done