diff options
author | Jim Meyering <meyering@fb.com> | 2013-10-24 11:21:03 -0700 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2013-10-24 13:47:46 -0700 |
commit | 37f7cd01040216c622fab84d3c6480774280e269 (patch) | |
tree | eee486f3a7362c0e1aeb703155329f2994a4c6f7 /tests | |
parent | 85e31d5a24018df78b6607dd82d4556936cac8df (diff) | |
download | grep-37f7cd01040216c622fab84d3c6480774280e269.tar.gz |
tests: port more tests to bourne shells with hex-challenged printf
* tests/pcre-utf8: Convert the hex \xHH literals for the euro symbol
to octal \OOO.
* tests/turkish-I: Likewise for "I with dot".
* tests/turkish-I-without-dot: Likewise for another Turkish I: U+0131.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/pcre-utf8 | 2 | ||||
-rwxr-xr-x | tests/turkish-I | 2 | ||||
-rwxr-xr-x | tests/turkish-I-without-dot | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/tests/pcre-utf8 b/tests/pcre-utf8 index 612b7029..b8228d51 100755 --- a/tests/pcre-utf8 +++ b/tests/pcre-utf8 @@ -16,7 +16,7 @@ fail=0 echo '$' | LC_ALL=en_US.UTF-8 grep -qP '\p{S}' \ || skip_ 'PCRE support is compiled out, or it does not support properties' -euro='\xe2\x82\xac euro' +euro='\342\202\254 euro' printf "$euro\\n" > in || framework_failure_ LC_ALL=en_US.UTF-8 grep -P '^\p{S}' in > out || fail=1 diff --git a/tests/turkish-I b/tests/turkish-I index 2decc46c..bb08553a 100755 --- a/tests/turkish-I +++ b/tests/turkish-I @@ -23,7 +23,7 @@ require_compiled_in_MB_support fail=0 -i='\xC4\xB0' +i='\304\260' printf "$i$i$i$i$i$i$i\n" > in || framework_failure_ LC_ALL=en_US.UTF-8 grep -i .... in > out || fail=1 diff --git a/tests/turkish-I-without-dot b/tests/turkish-I-without-dot index 2b4e9cc1..daf0b759 100755 --- a/tests/turkish-I-without-dot +++ b/tests/turkish-I-without-dot @@ -47,7 +47,7 @@ compare out in || fail=1 # buffer have precisely the same length (22 bytes here), yet internal # offsets do differ. Lengths are the same because while some bytes shrink # when converted to lower case, others grow, and here they balance out. -i='I\xC4\xB0' +i='I\304\260' printf "$i$i$i$i$i$i$i\n" > in || framework_failure_ LC_ALL=tr_TR.utf8 grep -i .... in > out || fail=1 compare out in || fail=1 |