summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-01-26 14:55:10 +0000
committerRichard W.M. Jones <rjones@redhat.com>2012-01-26 15:36:11 +0000
commit09227c9d664ca21b47b65c2fcd8fa2ddc485b554 (patch)
tree1209e5e9d6cccdc650e03fa4538139777ec62441
parent9f8e9dcc703759ff1f7413ebf75b90ca20e3acb4 (diff)
downloadlibguestfs-09227c9d664ca21b47b65c2fcd8fa2ddc485b554.tar.gz
libguestfs-09227c9d664ca21b47b65c2fcd8fa2ddc485b554.tar.xz
libguestfs-09227c9d664ca21b47b65c2fcd8fa2ddc485b554.zip
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.
-rwxr-xr-xfish/test-guestfish-escapes.sh28
1 files 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]"