test-yesno: work around sparc-dash here-document infelicity
authorJim Meyering <meyering@redhat.com>
Sun, 27 Sep 2009 06:41:55 +0000 (08:41 +0200)
committerJim Meyering <meyering@redhat.com>
Mon, 28 Sep 2009 09:35:53 +0000 (11:35 +0200)
Without this change, the literal \177 byte in a here document
would make dash 0.5.5.1-3 access uninitialized memory.
* tests/test-yesno.sh: Don't put the \177 byte in the here document.
Instead, use a marker, "@", and filter through tr to create the desired
contents.  Reported as <http://bugs.debian.org/548493> by Kurt Roeckx.

ChangeLog
tests/test-yesno.sh

index 12962ec042dadf675991dd1df266c3396436647b..f7ef1d65d3d03dccf2ebd700ba5ebbe41d362c0b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-09-27  Jim Meyering  <meyering@redhat.com>
+
+       test-yesno: work around sparc-dash here-document infelicity
+       Without this change, the literal \177 byte in a here document
+       would make dash 0.5.5.1-3 access uninitialized memory.
+       * tests/test-yesno.sh: Don't put the \177 byte in the here document.
+       Instead, use a marker, "@", and filter through tr to create the desired
+       contents.  Reported as <http://bugs.debian.org/548493> by Kurt Roeckx.
+
 2009-09-27  Bruno Haible  <bruno@clisp.org>
 
        Disable untested support for new flavours of ACLs on AIX.
index 52b94ef05b9f170a99bd62b3110c2b782bc178da..b1a5b65b85d1bc68975c95224a374ae039511f3f 100755 (executable)
@@ -19,9 +19,9 @@ else
 fi
 
 # Test with seekable stdin; the followon process must see remaining data.
-cat <<EOF > ${p}in.tmp
+tr @ '\177' <<EOF > ${p}in.tmp
 nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn - entire line consumed
-y\7fn - backspace does not change result
+y@n - backspace does not change result
 y
 does not match either yesexpr or noexpr
 n