Re: [PATCH v13 3/3] grep/pcre2: fix an edge case concerning ascii patterns and UTF-8 data
- From
Andreas Schwab <schwab@linux-m68k.org>
- Date
- Nov 16, 2021, 09:29 UTC
- Message-ID
- <87fsrwv46h.fsf@igel.home>
- In-Reply-To
- <CAPUEspi=r9EsG8KPvdiD-HM7Drq8ho1yjkN_c_T1e+ZeR4eejg@mail.gmail.com>
expecting success of 7812.13 '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++ git grep -h var invalid-0x80 ++ test_cmp expected actual ++ test 2 -ne 2 ++ eval 'diff -u' '"$@"' +++ diff -u expected actual ++ git grep -h '(*NO_JIT)var' invalid-0x80 fatal: pcre2_match failed with error code -22: UTF-8 error: isolated byte with 0x80 bit set error: last command exited with $?=128 not ok 13 - 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 #
Andreas.
-- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."