> Past these two hurdles, all grep
> tests pass and 2 gnulib tests fail (test-exclude2.sh, test-exclude5.sh).

Heh. That was with bash as shell. But without fiddling with the SHELL
variable, I get this failure:

FAIL: high-bit-range

The reason is that this shell's printf built-in does not interpret the
\x81 escape sequence. It does interpret \201 as an octal escape sequence,
though.

$ bash -c "printf '\\x81'" | od -t x1
0000000  81
0000001
$ /bin/sh -c "printf '\\x81'" | od -t x1
0000000  5c 78 38
0000003
$ /bin/sh -c "printf '\\201'" | od -t x1
0000000  81
0000001

While at it, let me also fix a bashism (while avoiding backslashes inside
backquote). I've tested this fix:


2011-11-11  Bruno Haible  <[email protected]>

        Fix high-bit-range test failure on OSF/1 5.1.
        * tests/high-bit-range: Use octal escape instead of hexadecimal escape
        sequence. Avoid $(...) syntax.

--- tests/high-bit-range.bak  2011-11-11 22:13:03 +0000
+++ tests/high-bit-range      2011-11-11 22:23:53 +0000
@@ -20,8 +20,10 @@
 
 fail=0
 
-printf '\x81\n' > in || framework_failure_
-grep "$(printf '[\x81]')" in > out || fail=1
+printf '\201\n' > in || framework_failure_
+pattern_format='[\201]'
+pattern=`printf "$pattern_format"`
+grep "$pattern" in > out || fail=1
 
 compare out in || fail=1
 
-- 
In memoriam Jan Opletal <http://en.wikipedia.org/wiki/Jan_Opletal>

Reply via email to