From 20137c8731d142797e2476e35fe724c95a8a7a06 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 9 Jun 2012 20:18:09 +0100 Subject: fish: Change test-escapes so test is not endian-sensitive. The test used the external 'od' command to compare the output of guestfish with what it's supposed to be. Unfortunately by default this outputs groups of 2-byte words, with the words' endianness affected by the current hardware endianness. For example: x86-64$ echo -n ab | od 0000000 061141 0000002 ppc64$ echo -n ab | od 0000000 060542 0000002 By using 'od -b' instead we can output bytes instead of words, and there is no endianness issue, and the output is clearer: x86-64$ echo -n ab | od -b 0000000 141 142 0000002 ppc64$ echo -n ab | od -b 0000000 141 142 0000002 --- fish/test-escapes.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fish/test-escapes.sh b/fish/test-escapes.sh index 4cd3cf2e..79762e53 100755 --- a/fish/test-escapes.sh +++ b/fish/test-escapes.sh @@ -22,7 +22,7 @@ set -e rm -f test.output test.error test.error.old -./guestfish <<'EOF' 2>test.error | od > test.output +./guestfish <<'EOF' 2>test.error | od -b > test.output echo "" echo " " echo " " @@ -75,8 +75,8 @@ command arguments not separated by whitespace" ]; then fi if [ "$(cat test.output)" != "\ -0000000 020012 020012 005040 005012 005015 005012 000412 000412 -0000020 040012 000012 +0000000 012 040 012 040 040 012 012 012 015 012 012 012 012 001 012 001 +0000020 012 100 012 0000023" ]; then echo "unexpected stdout from guestfish:" cat test.output -- cgit