From 09227c9d664ca21b47b65c2fcd8fa2ddc485b554 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 26 Jan 2012 14:55:10 +0000 Subject: fish: Fix 'test-guestfish-escapes.sh' when running an alternate guestfish binary. The error messages would be prefixed by the path to the alternate binary, eg: ../fish/guestfish: invalid escape sequence in string (starting at offset 0) Fix this by normalizing the messages further. --- fish/test-guestfish-escapes.sh | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/fish/test-guestfish-escapes.sh b/fish/test-guestfish-escapes.sh index c6b85774..3ab8a319 100755 --- a/fish/test-guestfish-escapes.sh +++ b/fish/test-guestfish-escapes.sh @@ -50,20 +50,24 @@ EOF # Since trace and debug output also goes to stderr, we must # remove it before testing. mv test.error test.error.old -< test.error.old grep -v '^libguestfs: ' | grep -vF "$HOME/.guestfish:" > test.error +< test.error.old \ + grep -v '^libguestfs: ' | \ + grep -vF "$HOME/.guestfish:" | \ + sed 's/.*guestfish: //' \ + > test.error if [ "$(cat test.error)" != "\ -guestfish: invalid escape sequence in string (starting at offset 0) -guestfish: invalid escape sequence in string (starting at offset 0) -guestfish: invalid escape sequence in string (starting at offset 0) -guestfish: invalid escape sequence in string (starting at offset 0) -guestfish: invalid escape sequence in string (starting at offset 0) -guestfish: invalid escape sequence in string (starting at offset 0) -guestfish: invalid escape sequence in string (starting at offset 0) -guestfish: unterminated double quote -guestfish: unterminated double quote -guestfish: unterminated double quote -guestfish: command arguments not separated by whitespace" ]; then +invalid escape sequence in string (starting at offset 0) +invalid escape sequence in string (starting at offset 0) +invalid escape sequence in string (starting at offset 0) +invalid escape sequence in string (starting at offset 0) +invalid escape sequence in string (starting at offset 0) +invalid escape sequence in string (starting at offset 0) +invalid escape sequence in string (starting at offset 0) +unterminated double quote +unterminated double quote +unterminated double quote +command arguments not separated by whitespace" ]; then echo "unexpected stderr from guestfish:" cat test.error echo "[end of stderr]" -- cgit