unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] test: replace $PWD with XXX in emacs & emacs-show tests
@ 2013-11-22 21:06 Tomi Ollila
  2013-11-23  0:25 ` [PATCH] test: replace $PWD with YYY " david
  0 siblings, 1 reply; 6+ messages in thread
From: Tomi Ollila @ 2013-11-22 21:06 UTC (permalink / raw)
  To: notmuch; +Cc: tomi.ollila

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 writte 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 XXX in ERROR file and expected
content is adjusted accordingly.
---

The regexp match replaces anything non-space ([^ ]) up to the command
name with XXX. As test suite generally doesn't support spaces in
directry path this is fine:

try  ln -s notmuch not\ much; cd not\ much; make test

and see what happens.

 test/emacs      | 5 +++--
 test/emacs-show | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/test/emacs b/test/emacs
index 3b3b14d..751d34e 100755
--- a/test/emacs
+++ b/test/emacs
@@ -881,7 +881,8 @@ test_emacs "(let ((notmuch-command \"$PWD/notmuch_fail\"))
 	       (with-current-buffer \"*Notmuch errors*\"
 		  (test-output \"ERROR\"))
 	       (test-output))"
-sed -i -e 's/^\[.*\]$/[XXX]/' ERROR
+sed -i	-e 's/^\[.*\]$/[XXX]/' \
+	-e '/^command: / s|[^ ]*/notmuch_fail |XXX/notmuch_fail |' ERROR
 test_expect_equal "$(cat OUTPUT; echo ---; cat MESSAGES; echo ---; cat ERROR)" "\
 End of search results.
 ---
@@ -889,7 +890,7 @@ $PWD/notmuch_fail exited with status 1 (see *Notmuch errors* for more details)
 ---
 [XXX]
 $PWD/notmuch_fail exited with status 1
-command: $PWD/notmuch_fail search --format\=sexp --format-version\=2 --sort\=newest-first tag\:inbox
+command: XXX/notmuch_fail search --format\=sexp --format-version\=2 --sort\=newest-first tag\:inbox
 exit status: 1"
 
 test_begin_subtest "Search handles subprocess warnings"
diff --git a/test/emacs-show b/test/emacs-show
index fb23db4..08de108 100755
--- a/test/emacs-show
+++ b/test/emacs-show
@@ -181,14 +181,15 @@ test_emacs "(let ((notmuch-command \"$PWD/notmuch_fail\"))
 	       (with-current-buffer \"*Notmuch errors*\"
 		  (test-output \"ERROR\"))
 	       (test-output))"
-sed -i -e 's/^\[.*\]$/[XXX]/' ERROR
+sed -i	-e 's/^\[.*\]$/[XXX]/' \
+	-e '/^command: / s|[^ ]*/notmuch_fail |XXX/notmuch_fail |' ERROR
 test_expect_equal "$(cat OUTPUT; echo ---; cat MESSAGES; echo ---; cat ERROR)" "\
 ---
 This is an error (see *Notmuch errors* for more details)
 ---
 [XXX]
 This is an error
-command: $PWD/notmuch_fail show --format\\=sexp --format-version\\=1 --exclude\\=false \\' \\* \\'
+command: XXX/notmuch_fail show --format\\=sexp --format-version\\=1 --exclude\\=false \\' \\* \\'
 exit status: 1
 stderr:
 This is an error
-- 
1.8.4.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] test: replace $PWD with YYY in emacs & emacs-show tests
  2013-11-22 21:06 [PATCH] test: replace $PWD with XXX in emacs & emacs-show tests Tomi Ollila
@ 2013-11-23  0:25 ` david
  2013-11-23  9:55   ` Tomi Ollila
  0 siblings, 1 reply; 6+ messages in thread
From: david @ 2013-11-23  0:25 UTC (permalink / raw)
  To: notmuch

From: David Bremner <david@tethera.net>

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.
---

The commit message is shamelessly boosted from Tomi's patch.  To be
honest I didn't notice that Tomi had already sent a patch when I
started on this, and then I was too stubborn to stop. I'm not sure
which is better. It depends whether you think the cosmetic stuff is an
improvement, or just gratuitous. For what it's worth (not that much as
Tomi points out) this should work ok with spaces in the path. Better
to light a candle than to curse the darkness, etc...

 test/emacs       | 15 ++++++++-------
 test/emacs-show  | 10 +++++-----
 test/test-lib.sh |  9 +++++++++
 3 files changed, 22 insertions(+), 12 deletions(-)

diff --git a/test/emacs b/test/emacs
index 3b3b14d..dd544f5e 100755
--- a/test/emacs
+++ b/test/emacs
@@ -881,15 +881,16 @@ 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 OUTPUT MESSAGES ERROR)" "\
+=== OUTPUT ===
 End of search results.
----
-$PWD/notmuch_fail exited with status 1 (see *Notmuch errors* for more details)
----
+=== MESSAGES ===
+YYY/notmuch_fail exited with status 1 (see *Notmuch errors* for more details)
+=== ERROR ===
 [XXX]
-$PWD/notmuch_fail exited with status 1
-command: $PWD/notmuch_fail search --format\=sexp --format-version\=2 --sort\=newest-first tag\:inbox
+YYY/notmuch_fail exited with status 1
+command: YYY/notmuch_fail search --format\=sexp --format-version\=2 --sort\=newest-first tag\:inbox
 exit status: 1"
 
 test_begin_subtest "Search handles subprocess warnings"
diff --git a/test/emacs-show b/test/emacs-show
index fb23db4..21f1c68 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 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
diff --git a/test/test-lib.sh b/test/test-lib.sh
index 2aa4dfc..611aee3 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -628,6 +628,15 @@ notmuch_json_show_sanitize ()
 	-e 's|"filename": "/[^"]*",|"filename": "YYYYY",|g'
 }
 
+notmuch_emacs_error_sanitize ()
+{
+    for file in "$@"; do
+	echo "=== $file ==="
+	cat "$file"
+    done | sed  \
+	-e 's/^\[.*\]$/[XXX]/' \
+	-e 's|^\(command: \)\{0,1\}/.*/notmuch_fail|\1YYY/notmuch_fail|'
+}
 # End of notmuch helper functions
 
 # Use test_set_prereq to tell that a particular prerequisite is available.
-- 
1.8.4.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] test: replace $PWD with YYY in emacs & emacs-show tests
  2013-11-23  0:25 ` [PATCH] test: replace $PWD with YYY " david
@ 2013-11-23  9:55   ` Tomi Ollila
  2013-11-23 11:01     ` [PATCH v2] " david
  0 siblings, 1 reply; 6+ messages in thread
From: Tomi Ollila @ 2013-11-23  9:55 UTC (permalink / raw)
  To: david, notmuch

On Sat, Nov 23 2013, david@tethera.net wrote:

> From: David Bremner <david@tethera.net>
>
> 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.
> ---
>
> The commit message is shamelessly boosted from Tomi's patch.  To be
> honest I didn't notice that Tomi had already sent a patch when I
> started on this, and then I was too stubborn to stop. I'm not sure
> which is better. It depends whether you think the cosmetic stuff is an
> improvement, or just gratuitous. For what it's worth (not that much as
> Tomi points out) this should work ok with spaces in the path. Better
> to light a candle than to curse the darkness, etc...

yesyes ;D

This patch has 2 (additional) improvements: 

1) it removes the unportable sed -i (GNU feature) 
2) informs developer from which files the comparison contents are coming from

There is also one problem: the notmuch_emacs_error_sanitize() expects
that the notmuch-command in question is always .../notmuch_fail. This 
doesn't look good in a (generic) function.

One option would be to change the regexp in notmuch_emacs_error_sanitize()
to something like:
>   -e 's|^\(command: \)[^ ]*/|\1YYY/|'

i.e. just touch the ^command: line, remove all nonspace(*) chars until last
slash (/) before space.

(*) we're back with this 'space' thing, but I dont's see any alternative.
Using set of allowed chars is impossible as users may have e.g. utf-8
chars in their paths... 


>
>  test/emacs       | 15 ++++++++-------
>  test/emacs-show  | 10 +++++-----
>  test/test-lib.sh |  9 +++++++++
>  3 files changed, 22 insertions(+), 12 deletions(-)
>
> diff --git a/test/emacs b/test/emacs
> index 3b3b14d..dd544f5e 100755
> --- a/test/emacs
> +++ b/test/emacs
> @@ -881,15 +881,16 @@ 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 OUTPUT MESSAGES ERROR)" "\
> +=== OUTPUT ===
>  End of search results.
> ----
> -$PWD/notmuch_fail exited with status 1 (see *Notmuch errors* for more details)
> ----
> +=== MESSAGES ===
> +YYY/notmuch_fail exited with status 1 (see *Notmuch errors* for more details)
> +=== ERROR ===
>  [XXX]
> -$PWD/notmuch_fail exited with status 1
> -command: $PWD/notmuch_fail search --format\=sexp --format-version\=2 --sort\=newest-first tag\:inbox
> +YYY/notmuch_fail exited with status 1
> +command: YYY/notmuch_fail search --format\=sexp --format-version\=2 --sort\=newest-first tag\:inbox
>  exit status: 1"
>  
>  test_begin_subtest "Search handles subprocess warnings"
> diff --git a/test/emacs-show b/test/emacs-show
> index fb23db4..21f1c68 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 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
> diff --git a/test/test-lib.sh b/test/test-lib.sh
> index 2aa4dfc..611aee3 100644
> --- a/test/test-lib.sh
> +++ b/test/test-lib.sh
> @@ -628,6 +628,15 @@ notmuch_json_show_sanitize ()
>  	-e 's|"filename": "/[^"]*",|"filename": "YYYYY",|g'
>  }
>  
> +notmuch_emacs_error_sanitize ()
> +{
> +    for file in "$@"; do
> +	echo "=== $file ==="
> +	cat "$file"
> +    done | sed  \
> +	-e 's/^\[.*\]$/[XXX]/' \
> +	-e 's|^\(command: \)\{0,1\}/.*/notmuch_fail|\1YYY/notmuch_fail|'
> +}
>  # End of notmuch helper functions
>  
>  # Use test_set_prereq to tell that a particular prerequisite is available.
> -- 
> 1.8.4.2
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] test: replace $PWD with YYY in emacs & emacs-show tests
  2013-11-23  9:55   ` Tomi Ollila
@ 2013-11-23 11:01     ` david
  2013-11-23 16:36       ` Tomi Ollila
  2013-11-24  1:36       ` David Bremner
  0 siblings, 2 replies; 6+ messages in thread
From: david @ 2013-11-23 11:01 UTC (permalink / raw)
  To: notmuch

From: David Bremner <david@tethera.net>

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.
---

In this second version, pass the command name to filter as a parameter

 test/emacs       | 15 ++++++++-------
 test/emacs-show  | 10 +++++-----
 test/test-lib.sh | 11 +++++++++++
 3 files changed, 24 insertions(+), 12 deletions(-)

diff --git a/test/emacs b/test/emacs
index 3b3b14d..456435c 100755
--- a/test/emacs
+++ b/test/emacs
@@ -881,15 +881,16 @@ 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 ===
 End of search results.
----
-$PWD/notmuch_fail exited with status 1 (see *Notmuch errors* for more details)
----
+=== MESSAGES ===
+YYY/notmuch_fail exited with status 1 (see *Notmuch errors* for more details)
+=== ERROR ===
 [XXX]
-$PWD/notmuch_fail exited with status 1
-command: $PWD/notmuch_fail search --format\=sexp --format-version\=2 --sort\=newest-first tag\:inbox
+YYY/notmuch_fail exited with status 1
+command: YYY/notmuch_fail search --format\=sexp --format-version\=2 --sort\=newest-first tag\:inbox
 exit status: 1"
 
 test_begin_subtest "Search handles subprocess warnings"
diff --git a/test/emacs-show b/test/emacs-show
index fb23db4..ec86333 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
diff --git a/test/test-lib.sh b/test/test-lib.sh
index 2aa4dfc..8611ba5 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -628,6 +628,17 @@ notmuch_json_show_sanitize ()
 	-e 's|"filename": "/[^"]*",|"filename": "YYYYY",|g'
 }
 
+notmuch_emacs_error_sanitize ()
+{
+    local command=$1
+    shift
+    for file in "$@"; do
+	echo "=== $file ==="
+	cat "$file"
+    done | sed  \
+	-e 's/^\[.*\]$/[XXX]/' \
+	-e "s|^\(command: \)\{0,1\}/.*/$command|\1YYY/$command|"
+}
 # End of notmuch helper functions
 
 # Use test_set_prereq to tell that a particular prerequisite is available.
-- 
1.8.4.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] test: replace $PWD with YYY in emacs & emacs-show tests
  2013-11-23 11:01     ` [PATCH v2] " david
@ 2013-11-23 16:36       ` Tomi Ollila
  2013-11-24  1:36       ` David Bremner
  1 sibling, 0 replies; 6+ messages in thread
From: Tomi Ollila @ 2013-11-23 16:36 UTC (permalink / raw)
  To: david, notmuch

On Sat, Nov 23 2013, david@tethera.net wrote:

> From: David Bremner <david@tethera.net>
>
> 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.
> ---
>
> In this second version, pass the command name to filter as a parameter

LGTM.

Tomi


>
>  test/emacs       | 15 ++++++++-------
>  test/emacs-show  | 10 +++++-----
>  test/test-lib.sh | 11 +++++++++++
>  3 files changed, 24 insertions(+), 12 deletions(-)
>
> diff --git a/test/emacs b/test/emacs
> index 3b3b14d..456435c 100755
> --- a/test/emacs
> +++ b/test/emacs
> @@ -881,15 +881,16 @@ 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 ===
>  End of search results.
> ----
> -$PWD/notmuch_fail exited with status 1 (see *Notmuch errors* for more details)
> ----
> +=== MESSAGES ===
> +YYY/notmuch_fail exited with status 1 (see *Notmuch errors* for more details)
> +=== ERROR ===
>  [XXX]
> -$PWD/notmuch_fail exited with status 1
> -command: $PWD/notmuch_fail search --format\=sexp --format-version\=2 --sort\=newest-first tag\:inbox
> +YYY/notmuch_fail exited with status 1
> +command: YYY/notmuch_fail search --format\=sexp --format-version\=2 --sort\=newest-first tag\:inbox
>  exit status: 1"
>  
>  test_begin_subtest "Search handles subprocess warnings"
> diff --git a/test/emacs-show b/test/emacs-show
> index fb23db4..ec86333 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
> diff --git a/test/test-lib.sh b/test/test-lib.sh
> index 2aa4dfc..8611ba5 100644
> --- a/test/test-lib.sh
> +++ b/test/test-lib.sh
> @@ -628,6 +628,17 @@ notmuch_json_show_sanitize ()
>  	-e 's|"filename": "/[^"]*",|"filename": "YYYYY",|g'
>  }
>  
> +notmuch_emacs_error_sanitize ()
> +{
> +    local command=$1
> +    shift
> +    for file in "$@"; do
> +	echo "=== $file ==="
> +	cat "$file"
> +    done | sed  \
> +	-e 's/^\[.*\]$/[XXX]/' \
> +	-e "s|^\(command: \)\{0,1\}/.*/$command|\1YYY/$command|"
> +}
>  # End of notmuch helper functions
>  
>  # Use test_set_prereq to tell that a particular prerequisite is available.
> -- 
> 1.8.4.2
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] test: replace $PWD with YYY in emacs & emacs-show tests
  2013-11-23 11:01     ` [PATCH v2] " david
  2013-11-23 16:36       ` Tomi Ollila
@ 2013-11-24  1:36       ` David Bremner
  1 sibling, 0 replies; 6+ messages in thread
From: David Bremner @ 2013-11-24  1:36 UTC (permalink / raw)
  To: notmuch

david@tethera.net writes:

> From: David Bremner <david@tethera.net>
>
> 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]").

pushed.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-11-24  1:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-22 21:06 [PATCH] test: replace $PWD with XXX in emacs & emacs-show tests Tomi Ollila
2013-11-23  0:25 ` [PATCH] test: replace $PWD with YYY " david
2013-11-23  9:55   ` Tomi Ollila
2013-11-23 11:01     ` [PATCH v2] " david
2013-11-23 16:36       ` Tomi Ollila
2013-11-24  1:36       ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).