Last change
on this file since 3605 was 3529, checked in by bird, 4 years ago |
Imported grep 3.7 from grep-3.7.tar.gz (sha256: c22b0cf2d4f6bbe599c902387e8058990e1eee99aef333a203829e5fd3dbb342), applying minimal auto-props.
|
-
Property svn:executable
set to
*
|
File size:
746 bytes
|
Line | |
---|
1 | #!/bin/sh
|
---|
2 | # Ensure that we don't trigger a grep -F infloop.
|
---|
3 |
|
---|
4 | . "${srcdir=.}/init.sh"; path_prepend_ ../src
|
---|
5 |
|
---|
6 | require_en_utf8_locale_
|
---|
7 | require_compiled_in_MB_support
|
---|
8 | require_timeout_
|
---|
9 |
|
---|
10 | encode() { echo "$1" | tr A '\202'; }
|
---|
11 |
|
---|
12 | encode AA > input
|
---|
13 |
|
---|
14 | fail=0
|
---|
15 |
|
---|
16 | # Before 2.15, this would infloop.
|
---|
17 | LC_ALL=en_US.UTF-8 timeout 10 grep -aF $(encode A) input > out
|
---|
18 | status=$?
|
---|
19 | if test $status -eq 0; then
|
---|
20 | compare input out
|
---|
21 | elif test $status -eq 1; then
|
---|
22 | compare_dev_null_ /dev/null out
|
---|
23 | else
|
---|
24 | test $status -eq 2
|
---|
25 | fi || fail=1
|
---|
26 |
|
---|
27 | LC_ALL=en_US.UTF-8 timeout 10 grep -F $(encode A) input > out
|
---|
28 | status=$?
|
---|
29 | if test $status -eq 0; then
|
---|
30 | compare /dev/null out
|
---|
31 | elif test $status -eq 1; then
|
---|
32 | compare_dev_null_ /dev/null out
|
---|
33 | else
|
---|
34 | test $status -eq 2
|
---|
35 | fi || fail=1
|
---|
36 |
|
---|
37 | Exit $fail
|
---|
Note:
See
TracBrowser
for help on using the repository browser.