unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] test/emacs: revert invalid-from test to pre-86f89385 behaviour
@ 2019-05-12  2:45 David Bremner
  2019-05-12 10:35 ` Tomi Ollila
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: David Bremner @ 2019-05-12  2:45 UTC (permalink / raw)
  To: notmuch

To the best of my understanding, this original behaviour was what
Carl's homebrew parser produced. With commit 86f89385 Austin switched
to using GMime (2.6). This produced arguably worse results, but since
the input was bad, we could live with it. Now with GMime 3.0 we are
getting the original results again, and there is no reason to consider
this test broken.
---
 test/T310-emacs.sh | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/test/T310-emacs.sh b/test/T310-emacs.sh
index c06a8133..5f74305d 100755
--- a/test/T310-emacs.sh
+++ b/test/T310-emacs.sh
@@ -86,14 +86,13 @@ test_emacs "(let ((notmuch-show-indent-messages-width 4))
 test_expect_equal_file $EXPECTED/notmuch-show-thread-maildir-storage-with-fourfold-indentation OUTPUT
 
 test_begin_subtest "notmuch-show for message with invalid From"
-test_subtest_known_broken
 add_message "[subject]=\"message-with-invalid-from\"" \
 	    "[from]=\"\\\"Invalid \\\" From\\\" <test_suite@notmuchmail.org>\""
 thread=$(notmuch search --output=threads subject:message-with-invalid-from)
 test_emacs "(notmuch-show \"$thread\")
 	    (test-output \"OUTPUT.raw\")"
 cat <<EOF >EXPECTED
-"Invalid " (2001-01-05) (inbox)
+Invalid " From <test_suite@notmuchmail.org> (2001-01-05) (inbox)
 Subject: message-with-invalid-from
 To: Notmuch Test Suite <test_suite@notmuchmail.org>
 Date: GENERATED_DATE
-- 
2.11.0

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

* Re: [PATCH] test/emacs: revert invalid-from test to pre-86f89385 behaviour
  2019-05-12  2:45 [PATCH] test/emacs: revert invalid-from test to pre-86f89385 behaviour David Bremner
@ 2019-05-12 10:35 ` Tomi Ollila
  2019-05-20 15:10 ` Daniel Kahn Gillmor
  2019-05-20 19:36 ` David Bremner
  2 siblings, 0 replies; 4+ messages in thread
From: Tomi Ollila @ 2019-05-12 10:35 UTC (permalink / raw)
  To: David Bremner, notmuch

On Sat, May 11 2019, David Bremner wrote:

> To the best of my understanding, this original behaviour was what
> Carl's homebrew parser produced. With commit 86f89385 Austin switched
> to using GMime (2.6). This produced arguably worse results, but since
> the input was bad, we could live with it. Now with GMime 3.0 we are
> getting the original results again, and there is no reason to consider
> this test broken.

if it works, push it !

> ---
>  test/T310-emacs.sh | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/test/T310-emacs.sh b/test/T310-emacs.sh
> index c06a8133..5f74305d 100755
> --- a/test/T310-emacs.sh
> +++ b/test/T310-emacs.sh
> @@ -86,14 +86,13 @@ test_emacs "(let ((notmuch-show-indent-messages-width 4))
>  test_expect_equal_file $EXPECTED/notmuch-show-thread-maildir-storage-with-fourfold-indentation OUTPUT
>  
>  test_begin_subtest "notmuch-show for message with invalid From"
> -test_subtest_known_broken
>  add_message "[subject]=\"message-with-invalid-from\"" \
>  	    "[from]=\"\\\"Invalid \\\" From\\\" <test_suite@notmuchmail.org>\""
>  thread=$(notmuch search --output=threads subject:message-with-invalid-from)
>  test_emacs "(notmuch-show \"$thread\")
>  	    (test-output \"OUTPUT.raw\")"
>  cat <<EOF >EXPECTED
> -"Invalid " (2001-01-05) (inbox)
> +Invalid " From <test_suite@notmuchmail.org> (2001-01-05) (inbox)
>  Subject: message-with-invalid-from
>  To: Notmuch Test Suite <test_suite@notmuchmail.org>
>  Date: GENERATED_DATE
> -- 
> 2.11.0
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch

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

* Re: [PATCH] test/emacs: revert invalid-from test to pre-86f89385 behaviour
  2019-05-12  2:45 [PATCH] test/emacs: revert invalid-from test to pre-86f89385 behaviour David Bremner
  2019-05-12 10:35 ` Tomi Ollila
@ 2019-05-20 15:10 ` Daniel Kahn Gillmor
  2019-05-20 19:36 ` David Bremner
  2 siblings, 0 replies; 4+ messages in thread
From: Daniel Kahn Gillmor @ 2019-05-20 15:10 UTC (permalink / raw)
  To: David Bremner, notmuch

[-- Attachment #1: Type: text/plain, Size: 813 bytes --]

On Sat 2019-05-11 20:45:59 -0600, David Bremner wrote:
> To the best of my understanding, this original behaviour was what
> Carl's homebrew parser produced. With commit 86f89385 Austin switched
> to using GMime (2.6). This produced arguably worse results, but since
> the input was bad, we could live with it. Now with GMime 3.0 we are
> getting the original results again, and there is no reason to consider
> this test broken.

this works for me.  I reviewed this earlier and tried to understand why
one ugly representation of invalid data was any worse than the other
ugly representation of invalid data. :P

It'd be great if someone wants to propose a principled way to handle
this invalid input, but just keeping the "broken" test around isn't a
good way to track that problem.

Please merge!

       --dkg

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

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

* Re: [PATCH] test/emacs: revert invalid-from test to pre-86f89385 behaviour
  2019-05-12  2:45 [PATCH] test/emacs: revert invalid-from test to pre-86f89385 behaviour David Bremner
  2019-05-12 10:35 ` Tomi Ollila
  2019-05-20 15:10 ` Daniel Kahn Gillmor
@ 2019-05-20 19:36 ` David Bremner
  2 siblings, 0 replies; 4+ messages in thread
From: David Bremner @ 2019-05-20 19:36 UTC (permalink / raw)
  To: notmuch

David Bremner <david@tethera.net> writes:

> To the best of my understanding, this original behaviour was what
> Carl's homebrew parser produced. With commit 86f89385 Austin switched
> to using GMime (2.6). This produced arguably worse results, but since
> the input was bad, we could live with it. Now with GMime 3.0 we are
> getting the original results again, and there is no reason to consider
> this test broken.

pushed to master

d

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

end of thread, other threads:[~2019-05-20 19:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-12  2:45 [PATCH] test/emacs: revert invalid-from test to pre-86f89385 behaviour David Bremner
2019-05-12 10:35 ` Tomi Ollila
2019-05-20 15:10 ` Daniel Kahn Gillmor
2019-05-20 19: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).