diff options
author | Norihiro Tanaka <noritnk@kcn.ne.jp> | 2014-01-13 08:42:25 -0800 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2014-01-26 08:32:41 -0800 |
commit | 3e64071cce24398133e6f9989225b4dbe58b6c97 (patch) | |
tree | 4e4d39b3aa7f970ce44a90aa04e83caf66be0b1b /tests/turkish-eyes | |
parent | f804d7afbf75f08fd209ad08358bf76c18cc1d56 (diff) | |
download | grep-3e64071cce24398133e6f9989225b4dbe58b6c97.tar.gz |
dfasearch: skip kwset optimization when multi-byte+case-insensitive
Now that DFA searching works with multi-byte locales, the only remaining
reason to case-convert the searched input is the kwset optimization.
But multi-byte case-conversion is so expensive that it's not
worthwhile even to attempt that optimization.
* src/dfasearch.c (kwsmusts): Skip this function in ignore-case mode
when the locale is multi-byte.
(EGexecute): Now that this code need not handle multi-byte case-ignoring
matches, remove the expensive copy/case-conversion code.
With no case-converted buffer, there is no longer any need to call
mb_case_map_apply, so remove it and associated code.
(kwsincr_case): Remove function. Now, every use of this function
is equivalent to a use of kwsincr. Replace all uses.
* tests/turkish-eyes: Test all of -E, -F and -G.
Diffstat (limited to 'tests/turkish-eyes')
-rwxr-xr-x | tests/turkish-eyes | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/turkish-eyes b/tests/turkish-eyes index 68301e7b..cc585dae 100755 --- a/tests/turkish-eyes +++ b/tests/turkish-eyes @@ -38,7 +38,9 @@ i=$(printf '\304\261') # lowercase dotless i search_str="$i:i I:$I" printf "$data\n" > in || framework_failure_ -LC_ALL=$L grep -i "^$search_str\$" in > out || fail=1 -compare out in || fail=1 +for opt in -E -F -G; do + LC_ALL=$L grep $opt -i "$search_str" in > out || fail=1 + compare out in || fail=1 +done Exit $fail |