From 2560996b7ebb08cca7e20fbb182998bc2e0e2151 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sat, 23 Nov 2013 07:01:16 -0400 Subject: test: replace $PWD with YYY in emacs & emacs-show tests When executed command line is written to *Notmuch errors* buffer, shell-quote-argument will backslash-escape any char that is not in "POSIX filename characters" (i.e. matching "[^-0-9a-zA-Z_./\n]"). Currently in two emacs tests shell has expanded $PWD as part of emacs variable, which will later be fed to #'shell-quote-argument and finally written to ERROR file. If $PWD contained non-POSIX filename characters, data in ERROR file will not match $PWD when later comparing in shell. Therefore, in these two particular cases the escaped $PWD is replaced with YYY in ERROR file and expected content is adjusted accordingly. --- test/emacs-show | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/emacs-show') diff --git a/test/emacs-show b/test/emacs-show index fb23db4d..ec863334 100755 --- a/test/emacs-show +++ b/test/emacs-show @@ -181,14 +181,14 @@ test_emacs "(let ((notmuch-command \"$PWD/notmuch_fail\")) (with-current-buffer \"*Notmuch errors*\" (test-output \"ERROR\")) (test-output))" -sed -i -e 's/^\[.*\]$/[XXX]/' ERROR -test_expect_equal "$(cat OUTPUT; echo ---; cat MESSAGES; echo ---; cat ERROR)" "\ ---- +test_expect_equal "$(notmuch_emacs_error_sanitize notmuch_fail OUTPUT MESSAGES ERROR)" "\ +=== OUTPUT === +=== MESSAGES === This is an error (see *Notmuch errors* for more details) ---- +=== ERROR === [XXX] This is an error -command: $PWD/notmuch_fail show --format\\=sexp --format-version\\=1 --exclude\\=false \\' \\* \\' +command: YYY/notmuch_fail show --format\\=sexp --format-version\\=1 --exclude\\=false \\' \\* \\' exit status: 1 stderr: This is an error -- cgit v1.2.3