diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/README | 7 | ||||
-rw-r--r-- | test/corpus/cur/52:2, | 39 | ||||
-rw-r--r-- | test/corpus/cur/53:2, | 20 | ||||
-rwxr-xr-x | test/emacs | 8 | ||||
-rwxr-xr-x | test/emacs-subject-to-filename | 138 | ||||
-rw-r--r-- | test/emacs.expected-output/notmuch-hello | 4 | ||||
-rw-r--r-- | test/emacs.expected-output/notmuch-hello-no-saved-searches | 2 | ||||
-rw-r--r-- | test/emacs.expected-output/notmuch-hello-view-inbox | 2 | ||||
-rw-r--r-- | test/emacs.expected-output/notmuch-hello-with-empty | 4 | ||||
-rw-r--r-- | test/emacs.expected-output/notmuch-search-tag-inbox | 2 | ||||
-rw-r--r-- | test/emacs.expected-output/notmuch-show-thread-maildir-storage | 33 | ||||
-rw-r--r-- | test/emacs.expected-output/notmuch-show-thread-maildir-storage-with-fourfold-indentation | 33 | ||||
-rw-r--r-- | test/emacs.expected-output/notmuch-show-thread-maildir-storage-without-indentation | 33 | ||||
-rwxr-xr-x | test/encoding | 2 | ||||
-rwxr-xr-x | test/maildir-sync | 4 | ||||
-rwxr-xr-x | test/notmuch-test | 1 | ||||
-rwxr-xr-x | test/python | 20 | ||||
-rwxr-xr-x | test/raw | 4 | ||||
-rwxr-xr-x | test/search | 13 | ||||
-rwxr-xr-x | test/search-output | 16 | ||||
-rwxr-xr-x | test/symbol-hiding | 2 | ||||
-rw-r--r-- | test/test-lib.sh | 6 |
22 files changed, 315 insertions, 78 deletions
diff --git a/test/README b/test/README index 7b2e96d4..bde6db0c 100644 --- a/test/README +++ b/test/README @@ -56,6 +56,13 @@ can be specified as follows: make test OPTIONS="--verbose" +You can choose an emacs binary to run the tests in one of the +following ways. + + TEST_EMACS=my-special-emacs make test + TEST_EMACS=my-special-emacs ./emacs + make test TEST_EMACS=my-special-emacs + Skipping Tests -------------- If, for any reason, you need to skip one or more tests, you can do so diff --git a/test/corpus/cur/52:2, b/test/corpus/cur/52:2, new file mode 100644 index 00000000..60283404 --- /dev/null +++ b/test/corpus/cur/52:2, @@ -0,0 +1,39 @@ +Message-ID: <4EFC743A.3060609@april.org> +Date: Thu, 29 Dec 2010 15:07:54 +0100 +From: "=?ISO-8859-1?Q?Fran=E7ois_Boulogne?=" <boulogne.f@gmail.com> +User-Agent: Mozilla/5.0 (X11; Linux i686; + rv:9.0) Gecko/20111224 Thunderbird/9.0.1 +MIME-Version: 1.0 +To: Allan McRae <allan@archlinux.org>, + "Discussion about the Arch User Repository (AUR)" <aur-general@archlinux.org> +References: <4EFC3931.6030007@april.org> <4EFC3D62.4030202@archlinux.org> +In-Reply-To: <4EFC3D62.4030202@archlinux.org> +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit +Subject: Re: [aur-general] Guidelines: cp, mkdir vs install + +Le 29/12/2011 11:13, Allan McRae a écrit : +> On 29/12/11 19:56, François Boulogne wrote: +>> Hi, +>> +>> Looking to improve the quality of my packages, I read again the guidelines. +>> https://wiki.archlinux.org/index.php/Arch_Packaging_Standards +>> +>> However, it don't see anything about the install command like +>> install -d $pkgdir/usr/{bin,share/man/man1,share/locale} +>> +>> Some contributors on AUR use cp or mkdir to install files/dir (when no +>> makefile is provided) and others use install command. +>> +>> What's the opinion of TU on this point? +>> +> +> Use install with -m specifying the correct permissions +> + +Thank you Allan + + +-- +François Boulogne. +https://www.sciunto.org diff --git a/test/corpus/cur/53:2, b/test/corpus/cur/53:2, new file mode 100644 index 00000000..7a1e2e58 --- /dev/null +++ b/test/corpus/cur/53:2, @@ -0,0 +1,20 @@ +From: Olivier Berger <olivier.berger@it-sudparis.eu> +To: olivier.berger@it-sudparis.eu +Subject: Essai =?iso-8859-1?Q?accentu=E9?= +User-Agent: Notmuch/0.10.1 (http://notmuchmail.org) Emacs/23.3.1 (i486-pc-linux-gnu) +X-Draft-From: ("nnimap+localdovecot:INBOX" 44228) +Date: Fri, 16 Dec 2010 16:49:59 +0100 +Message-ID: <877h1wv7mg.fsf@inf-8657.int-evry.fr> +MIME-Version: 1.0 +Content-Type: text/plain; charset=iso-8859-1 +Content-Transfer-Encoding: quoted-printable + +Du texte accentu=E9 pour =E7a ... + +=E0 la bonne heure ! +--=20 +Olivier BERGER=20 +http://www-public.it-sudparis.eu/~berger_o/ - OpenPGP-Id: 2048R/5819D7E8 +Ingenieur Recherche - Dept INF +Institut TELECOM, SudParis (http://www.it-sudparis.eu/), Evry (France) + @@ -81,7 +81,7 @@ cat <<EOF >EXPECTED "Invalid " From" <test_suite@notmuchmail.org> (2001-01-05) (inbox) Subject: message-with-invalid-from To: Notmuch Test Suite <test_suite@notmuchmail.org> -Date: Tue, 05 Jan 2001 15:43:57 -0000 +Date: Fri, 05 Jan 2001 15:43:57 +0000 This is just a test message (#1) EOF @@ -320,7 +320,7 @@ add_message '[from]="Top Poster <top@poster.com>"' \ ----- Original Message ----- From: Notmuch Test Suite <test_suite@notmuchmail.org> To: Notmuch Test Suite <test_suite@notmuchmai.org> -Sent: Tue, 05 Jan 2001 15:43:57 -0000 +Sent: Fri, 05 Jan 2001 15:43:57 +0000 Subject: The problem with top-posting Q: Why is top-posting such a bad thing? @@ -331,7 +331,7 @@ test_emacs "(notmuch-show \"top-posting\") echo "Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox) Subject: The problem with top-posting To: Notmuch Test Suite <test_suite@notmuchmail.org> -Date: Tue, 05 Jan 2001 15:43:57 -0000 +Date: Fri, 05 Jan 2001 15:43:57 +0000 A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? @@ -340,7 +340,7 @@ Q: What is the most annoying thing in e-mail? Top Poster <top@poster.com> (2001-01-05) (inbox unread) Subject: Re: The problem with top-posting To: Notmuch Test Suite <test_suite@notmuchmail.org> -Date: Tue, 05 Jan 2001 15:43:57 -0000 +Date: Fri, 05 Jan 2001 15:43:57 +0000 Thanks for the advice! I will be sure to put it to good use. diff --git a/test/emacs-subject-to-filename b/test/emacs-subject-to-filename new file mode 100755 index 00000000..176e6859 --- /dev/null +++ b/test/emacs-subject-to-filename @@ -0,0 +1,138 @@ +#!/usr/bin/env bash + +test_description="emacs: mail subject to filename" +. test-lib.sh + +# emacs server can't be started in a child process with $(test_emacs ...) +test_emacs '(ignore)' + +# test notmuch-wash-subject-to-patch-sequence-number (subject) +test_begin_subtest "no patch sequence number" +output=$(test_emacs '(notmuch-wash-subject-to-patch-sequence-number + "[PATCH] A normal patch subject without numbers")' +) +test_expect_equal "$output" "" + +test_begin_subtest "patch sequence number #1" +output=$(test_emacs '(notmuch-wash-subject-to-patch-sequence-number + "[PATCH 2/3] A most regular patch subject")' +) +test_expect_equal "$output" 2 + +test_begin_subtest "patch sequence number #2" +output=$(test_emacs '(notmuch-wash-subject-to-patch-sequence-number + " [dummy list prefix] [RFC PATCH v2 13/42] Special prefixes")' +) +test_expect_equal "$output" 13 + +test_begin_subtest "patch sequence number #3" +output=$(test_emacs '(notmuch-wash-subject-to-patch-sequence-number + "[PATCH 2/3] [PATCH 032/037] use the last prefix")' +) +test_expect_equal "$output" 32 + +test_begin_subtest "patch sequence number #4" +output=$(test_emacs '(notmuch-wash-subject-to-patch-sequence-number + "[dummy list prefix] [PATCH 2/3] PATCH 3/3] do not use a broken prefix")' +) +test_expect_equal "$output" 2 + +test_begin_subtest "patch sequence number #5" +output=$(test_emacs '(notmuch-wash-subject-to-patch-sequence-number + "[RFC][PATCH 3/5][PATCH 4/5][PATCH 5/5] A made up test")' +) +test_expect_equal "$output" 5 + +test_begin_subtest "patch sequence number #6" +output=$(test_emacs '(notmuch-wash-subject-to-patch-sequence-number + "[PATCH 2/3] this -> [PATCH 3/3] is not a prefix anymore [nor this 4/4]")' +) +test_expect_equal "$output" 2 + +test_begin_subtest "patch sequence number #7" +output=$(test_emacs '(notmuch-wash-subject-to-patch-sequence-number + "[liberally accept crapola right before123/456and after] the numbers")' +) +test_expect_equal "$output" 123 + +# test notmuch-wash-subject-to-filename (subject &optional maxlen) +test_begin_subtest "filename #1" +output=$(test_emacs '(notmuch-wash-subject-to-filename + "just a subject line")' +) +test_expect_equal $output '"just-a-subject-line"' + +test_begin_subtest "filename #2" +output=$(test_emacs '(notmuch-wash-subject-to-filename + " [any] [prefixes are ] [removed!] from the subject")' +) +test_expect_equal $output '"from-the-subject"' + +test_begin_subtest "filename #3" +output=$(test_emacs '(notmuch-wash-subject-to-filename + " leading and trailing space ")' +) +test_expect_equal $output '"leading-and-trailing-space"' + +test_begin_subtest "filename #4" +output=$(test_emacs '(notmuch-wash-subject-to-filename + "!# leading ()// &%, and in between_and_trailing garbage ()(&%%")' +) +test_expect_equal $output '"-leading-and-in-between_and_trailing-garbage"' + +test_begin_subtest "filename #5" +output=$(test_emacs '(notmuch-wash-subject-to-filename + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-_01234567890")' +) +test_expect_equal $output '"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-_01234567890"' + +test_begin_subtest "filename #6" +output=$(test_emacs '(notmuch-wash-subject-to-filename + "sequences of ... are squashed and trailing are removed ...")' +) +test_expect_equal $output '"sequences-of-.-are-squashed-and-trailing-are-removed"' + +test_begin_subtest "filename #7" +output=$(test_emacs '(notmuch-wash-subject-to-filename + "max length test" 1)' +) +test_expect_equal $output '"m"' + +test_begin_subtest "filename #8" +output=$(test_emacs '(notmuch-wash-subject-to-filename + "max length test /&(/%&/%%&¤%¤" 20)' +) +test_expect_equal $output '"max-length-test"' + +test_begin_subtest "filename #9" +output=$(test_emacs '(notmuch-wash-subject-to-filename + "[a prefix] [is only separated] by [spaces], so \"by\" is not okay!")' +) +test_expect_equal $output '"by-spaces-so-by-is-not-okay"' + +# test notmuch-wash-subject-to-patch-filename (subject) +test_begin_subtest "patch filename #1" +output=$(test_emacs '(notmuch-wash-subject-to-patch-filename + "[RFC][PATCH 099/100] rewrite notmuch")' +) +test_expect_equal "$output" '"0099-rewrite-notmuch.patch"' + +test_begin_subtest "patch filename #2" +output=$(test_emacs '(notmuch-wash-subject-to-patch-filename + "[RFC PATCH v1] has no patch number, default to 1")' +) +test_expect_equal "$output" '"0001-has-no-patch-number-default-to-1.patch"' + +test_begin_subtest "patch filename #3" +output=$(test_emacs '(notmuch-wash-subject-to-patch-filename + "[PATCH 4/5] the maximum length of a patch filename is 52 + patch sequence number + .patch extension")' +) +test_expect_equal "$output" '"0004-the-maximum-length-of-a-patch-filename-is-52-patch-s.patch"' + +test_begin_subtest "patch filename #4" +output=$(test_emacs '(notmuch-wash-subject-to-patch-filename + "[PATCH 4/5] the maximum length of a patch filename is 52 + patchh ! sequence number + .patch extension, *before* trimming trailing - and .")' +) +test_expect_equal "$output" '"0004-the-maximum-length-of-a-patch-filename-is-52-patchh.patch"' + +test_done diff --git a/test/emacs.expected-output/notmuch-hello b/test/emacs.expected-output/notmuch-hello index 48143bd7..de57de25 100644 --- a/test/emacs.expected-output/notmuch-hello +++ b/test/emacs.expected-output/notmuch-hello @@ -1,8 +1,8 @@ - Welcome to notmuch. You have 50 messages. + Welcome to notmuch. You have 52 messages. Saved searches: [edit] - 50 inbox 50 unread + 52 inbox 52 unread Search: diff --git a/test/emacs.expected-output/notmuch-hello-no-saved-searches b/test/emacs.expected-output/notmuch-hello-no-saved-searches index 7c09e40b..f1fc4d6a 100644 --- a/test/emacs.expected-output/notmuch-hello-no-saved-searches +++ b/test/emacs.expected-output/notmuch-hello-no-saved-searches @@ -1,4 +1,4 @@ - Welcome to notmuch. You have 50 messages. + Welcome to notmuch. You have 52 messages. Search: diff --git a/test/emacs.expected-output/notmuch-hello-view-inbox b/test/emacs.expected-output/notmuch-hello-view-inbox index 894ae5fa..1688d674 100644 --- a/test/emacs.expected-output/notmuch-hello-view-inbox +++ b/test/emacs.expected-output/notmuch-hello-view-inbox @@ -20,4 +20,6 @@ 2009-11-18 [1/1] Alexander Botero-Lowry [notmuch] request for pull (inbox unread) 2009-11-18 [2/2] Keith Packard, Alexander Botero-Lowry [notmuch] [PATCH] Create a default notmuch-show-hook that highlights URLs and uses word-wrap (inbox unread) 2009-11-18 [1/1] Chris Wilson [notmuch] [PATCH 1/2] Makefile: evaluate pkg-config once (inbox unread) + 2010-12-16 [1/1] Olivier Berger Essai accentué (inbox unread) + 2010-12-29 [1/1] François Boulogne [aur-general] Guidelines: cp, mkdir vs install (inbox unread) End of search results. diff --git a/test/emacs.expected-output/notmuch-hello-with-empty b/test/emacs.expected-output/notmuch-hello-with-empty index 2a267c92..dd8728b1 100644 --- a/test/emacs.expected-output/notmuch-hello-with-empty +++ b/test/emacs.expected-output/notmuch-hello-with-empty @@ -1,8 +1,8 @@ - Welcome to notmuch. You have 50 messages. + Welcome to notmuch. You have 52 messages. Saved searches: [edit] - 50 inbox 50 unread 0 empty + 52 inbox 52 unread 0 empty Search: diff --git a/test/emacs.expected-output/notmuch-search-tag-inbox b/test/emacs.expected-output/notmuch-search-tag-inbox index 9456ccfd..8a53555a 100644 --- a/test/emacs.expected-output/notmuch-search-tag-inbox +++ b/test/emacs.expected-output/notmuch-search-tag-inbox @@ -1,3 +1,5 @@ + 2010-12-29 [1/1] François Boulogne [aur-general] Guidelines: cp, mkdir vs install (inbox unread) + 2010-12-16 [1/1] Olivier Berger Essai accentué (inbox unread) 2009-11-18 [1/1] Chris Wilson [notmuch] [PATCH 1/2] Makefile: evaluate pkg-config once (inbox unread) 2009-11-18 [2/2] Alex Botero-Lowry, Carl Worth [notmuch] [PATCH] Error out if no query is supplied to search instead of going into an infinite loop (attachment inbox unread) 2009-11-18 [2/2] Ingmar Vanhassel, Carl Worth [notmuch] [PATCH] Typsos (inbox unread) diff --git a/test/emacs.expected-output/notmuch-show-thread-maildir-storage b/test/emacs.expected-output/notmuch-show-thread-maildir-storage index 8ba64b27..cdbfa1d7 100644 --- a/test/emacs.expected-output/notmuch-show-thread-maildir-storage +++ b/test/emacs.expected-output/notmuch-show-thread-maildir-storage @@ -26,12 +26,11 @@ with Maildir) or if something else is going on. Cheers, -[ 5-line signature. Click/Enter to show. ] +[ 4-line signature. Click/Enter to show. ] -- Lars Kellogg-Stedman <lars@seas.harvard.edu> Senior Technologist, Computing and Information Technology Harvard University School of Engineering and Applied Sciences - [ application/pgp-signature ] [ text/plain ] [ 4-line signature. Click/Enter to show. ] @@ -48,12 +47,14 @@ http://notmuchmail.org/mailman/listinfo/notmuch [ multipart/signed ] [ text/plain ] - Twas brillig at 14:00:54 17.11.2009 UTC-05 when lars@seas.harvard.edu did gyre and gimble: + Twas brillig at 14:00:54 17.11.2009 UTC-05 when lars@seas.harvard.edu did + gyre and gimble: LK> Resulted in 4604 lines of errors along the lines of: LK> Error opening - LK> /home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S: + LK> + /home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S: LK> Too many open files See the patch just posted here. @@ -88,12 +89,11 @@ http://notmuchmail.org/mailman/listinfo/notmuch -- Lars - [ 5-line signature. Click/Enter to show. ] + [ 4-line signature. Click/Enter to show. ] -- Lars Kellogg-Stedman <lars@seas.harvard.edu> Senior Technologist, Computing and Information Technology Harvard University School of Engineering and Applied Sciences - [ application/pgp-signature ] [ text/plain ] [ 4-line signature. Click/Enter to show. ] @@ -106,8 +106,8 @@ http://notmuchmail.org/mailman/listinfo/notmuch To: notmuch@notmuchmail.org Date: Wed, 18 Nov 2009 02:50:48 +0600 - - Twas brillig at 15:33:01 17.11.2009 UTC-05 when lars at seas.harvard.edu did gyre and gimble: + Twas brillig at 15:33:01 17.11.2009 UTC-05 when lars at seas.harvard.edu + did gyre and gimble: LK> Is the list archived anywhere? The obvious archives LK> (http://notmuchmail.org/pipermail/notmuch/) aren't available, and I @@ -127,14 +127,15 @@ http://notmuchmail.org/mailman/listinfo/notmuch Type: application/pgp-signature Size: 834 bytes Desc: not available - URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20091118/0e33d964/attachment.pgp> - + URL: + <http://notmuchmail.org/pipermail/notmuch/attachments/20091118/0e33d964/attachment.pgp> Keith Packard <keithp@keithp.com> (2009-11-17) (inbox unread) Subject: [notmuch] Working with Maildir storage? To: notmuch@notmuchmail.org Date: Tue, 17 Nov 2009 13:24:13 -0800 - On Tue, 17 Nov 2009 15:33:01 -0500, Lars Kellogg-Stedman <lars at seas.harvard.edu> wrote: + On Tue, 17 Nov 2009 15:33:01 -0500, Lars Kellogg-Stedman <lars at + seas.harvard.edu> wrote: > > See the patch just posted here. I've also pushed a slightly more complicated (and complete) fix to my @@ -150,7 +151,6 @@ http://notmuchmail.org/mailman/listinfo/notmuch Thanks to everyone for trying out notmuch! -keith - Lars Kellogg-Stedman <lars@seas.harvard.edu> (2009-11-18) (inbox signed unread) Subject: Re: [notmuch] Working with Maildir storage? To: Keith Packard <keithp@keithp.com> @@ -166,12 +166,11 @@ http://notmuchmail.org/mailman/listinfo/notmuch The version of lib/messages.cc in your repo doesn't build because it's missing "#include <stdint.h>" (for the uint32_t on line 466). - [ 5-line signature. Click/Enter to show. ] + [ 4-line signature. Click/Enter to show. ] -- Lars Kellogg-Stedman <lars@seas.harvard.edu> Senior Technologist, Computing and Information Technology Harvard University School of Engineering and Applied Sciences - [ application/pgp-signature ] [ text/plain ] [ 4-line signature. Click/Enter to show. ] @@ -184,7 +183,8 @@ http://notmuchmail.org/mailman/listinfo/notmuch To: notmuch@notmuchmail.org Date: Wed, 18 Nov 2009 02:08:10 -0800 - On Tue, 17 Nov 2009 14:00:54 -0500, Lars Kellogg-Stedman <lars at seas.harvard.edu> wrote: + On Tue, 17 Nov 2009 14:00:54 -0500, Lars Kellogg-Stedman <lars at + seas.harvard.edu> wrote: > I saw the LWN article and decided to take a look at notmuch. I'm > currently using mutt and mairix to index and read a collection of > Maildir mail folders (around 40,000 messages total). @@ -195,7 +195,7 @@ http://notmuchmail.org/mailman/listinfo/notmuch That's very interesting. So, thanks for coming and trying out notmuch. > Error opening - > /home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S: + > /home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S: > Too many open files Sadly, the lwn article coincided with me having just introduced this @@ -212,4 +212,3 @@ http://notmuchmail.org/mailman/listinfo/notmuch Happy hacking, -Carl - diff --git a/test/emacs.expected-output/notmuch-show-thread-maildir-storage-with-fourfold-indentation b/test/emacs.expected-output/notmuch-show-thread-maildir-storage-with-fourfold-indentation index 41e2aaa3..b0bf93ed 100644 --- a/test/emacs.expected-output/notmuch-show-thread-maildir-storage-with-fourfold-indentation +++ b/test/emacs.expected-output/notmuch-show-thread-maildir-storage-with-fourfold-indentation @@ -26,12 +26,11 @@ with Maildir) or if something else is going on. Cheers, -[ 5-line signature. Click/Enter to show. ] +[ 4-line signature. Click/Enter to show. ] -- Lars Kellogg-Stedman <lars@seas.harvard.edu> Senior Technologist, Computing and Information Technology Harvard University School of Engineering and Applied Sciences - [ application/pgp-signature ] [ text/plain ] [ 4-line signature. Click/Enter to show. ] @@ -48,12 +47,14 @@ http://notmuchmail.org/mailman/listinfo/notmuch [ multipart/signed ] [ text/plain ] - Twas brillig at 14:00:54 17.11.2009 UTC-05 when lars@seas.harvard.edu did gyre and gimble: + Twas brillig at 14:00:54 17.11.2009 UTC-05 when lars@seas.harvard.edu did + gyre and gimble: LK> Resulted in 4604 lines of errors along the lines of: LK> Error opening - LK> /home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S: + LK> + /home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S: LK> Too many open files See the patch just posted here. @@ -88,12 +89,11 @@ http://notmuchmail.org/mailman/listinfo/notmuch -- Lars - [ 5-line signature. Click/Enter to show. ] + [ 4-line signature. Click/Enter to show. ] -- Lars Kellogg-Stedman <lars@seas.harvard.edu> Senior Technologist, Computing and Information Technology Harvard University School of Engineering and Applied Sciences - [ application/pgp-signature ] [ text/plain ] [ 4-line signature. Click/Enter to show. ] @@ -106,8 +106,8 @@ http://notmuchmail.org/mailman/listinfo/notmuch To: notmuch@notmuchmail.org Date: Wed, 18 Nov 2009 02:50:48 +0600 - - Twas brillig at 15:33:01 17.11.2009 UTC-05 when lars at seas.harvard.edu did gyre and gimble: + Twas brillig at 15:33:01 17.11.2009 UTC-05 when lars at seas.harvard.edu + did gyre and gimble: LK> Is the list archived anywhere? The obvious archives LK> (http://notmuchmail.org/pipermail/notmuch/) aren't available, and I @@ -127,14 +127,15 @@ http://notmuchmail.org/mailman/listinfo/notmuch Type: application/pgp-signature Size: 834 bytes Desc: not available - URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20091118/0e33d964/attachment.pgp> - + URL: + <http://notmuchmail.org/pipermail/notmuch/attachments/20091118/0e33d964/attachment.pgp> Keith Packard <keithp@keithp.com> (2009-11-17) (inbox unread) Subject: [notmuch] Working with Maildir storage? To: notmuch@notmuchmail.org Date: Tue, 17 Nov 2009 13:24:13 -0800 - On Tue, 17 Nov 2009 15:33:01 -0500, Lars Kellogg-Stedman <lars at seas.harvard.edu> wrote: + On Tue, 17 Nov 2009 15:33:01 -0500, Lars Kellogg-Stedman <lars at + seas.harvard.edu> wrote: > > See the patch just posted here. I've also pushed a slightly more complicated (and complete) fix to my @@ -150,7 +151,6 @@ http://notmuchmail.org/mailman/listinfo/notmuch Thanks to everyone for trying out notmuch! -keith - Lars Kellogg-Stedman <lars@seas.harvard.edu> (2009-11-18) (inbox signed unread) Subject: Re: [notmuch] Working with Maildir storage? To: Keith Packard <keithp@keithp.com> @@ -166,12 +166,11 @@ http://notmuchmail.org/mailman/listinfo/notmuch The version of lib/messages.cc in your repo doesn't build because it's missing "#include <stdint.h>" (for the uint32_t on line 466). - [ 5-line signature. Click/Enter to show. ] + [ 4-line signature. Click/Enter to show. ] -- Lars Kellogg-Stedman <lars@seas.harvard.edu> Senior Technologist, Computing and Information Technology Harvard University School of Engineering and Applied Sciences - [ application/pgp-signature ] [ text/plain ] [ 4-line signature. Click/Enter to show. ] @@ -184,7 +183,8 @@ http://notmuchmail.org/mailman/listinfo/notmuch To: notmuch@notmuchmail.org Date: Wed, 18 Nov 2009 02:08:10 -0800 - On Tue, 17 Nov 2009 14:00:54 -0500, Lars Kellogg-Stedman <lars at seas.harvard.edu> wrote: + On Tue, 17 Nov 2009 14:00:54 -0500, Lars Kellogg-Stedman <lars at + seas.harvard.edu> wrote: > I saw the LWN article and decided to take a look at notmuch. I'm > currently using mutt and mairix to index and read a collection of > Maildir mail folders (around 40,000 messages total). @@ -195,7 +195,7 @@ http://notmuchmail.org/mailman/listinfo/notmuch That's very interesting. So, thanks for coming and trying out notmuch. > Error opening - > /home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S: + > /home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S: > Too many open files Sadly, the lwn article coincided with me having just introduced this @@ -212,4 +212,3 @@ http://notmuchmail.org/mailman/listinfo/notmuch Happy hacking, -Carl - diff --git a/test/emacs.expected-output/notmuch-show-thread-maildir-storage-without-indentation b/test/emacs.expected-output/notmuch-show-thread-maildir-storage-without-indentation index fa2108ef..08de8b5d 100644 --- a/test/emacs.expected-output/notmuch-show-thread-maildir-storage-without-indentation +++ b/test/emacs.expected-output/notmuch-show-thread-maildir-storage-without-indentation @@ -26,12 +26,11 @@ with Maildir) or if something else is going on. Cheers, -[ 5-line signature. Click/Enter to show. ] +[ 4-line signature. Click/Enter to show. ] -- Lars Kellogg-Stedman <lars@seas.harvard.edu> Senior Technologist, Computing and Information Technology Harvard University School of Engineering and Applied Sciences - [ application/pgp-signature ] [ text/plain ] [ 4-line signature. Click/Enter to show. ] @@ -48,12 +47,14 @@ Date: Wed, 18 Nov 2009 01:02:38 +0600 [ multipart/signed ] [ text/plain ] -Twas brillig at 14:00:54 17.11.2009 UTC-05 when lars@seas.harvard.edu did gyre and gimble: +Twas brillig at 14:00:54 17.11.2009 UTC-05 when lars@seas.harvard.edu did +gyre and gimble: LK> Resulted in 4604 lines of errors along the lines of: LK> Error opening - LK> /home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S: + LK> +/home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S: LK> Too many open files See the patch just posted here. @@ -88,12 +89,11 @@ It doesn't look like the patch is in git yet. -- Lars -[ 5-line signature. Click/Enter to show. ] +[ 4-line signature. Click/Enter to show. ] -- Lars Kellogg-Stedman <lars@seas.harvard.edu> Senior Technologist, Computing and Information Technology Harvard University School of Engineering and Applied Sciences - [ application/pgp-signature ] [ text/plain ] [ 4-line signature. Click/Enter to show. ] @@ -106,8 +106,8 @@ Subject: [notmuch] Working with Maildir storage? To: notmuch@notmuchmail.org Date: Wed, 18 Nov 2009 02:50:48 +0600 - -Twas brillig at 15:33:01 17.11.2009 UTC-05 when lars at seas.harvard.edu did gyre and gimble: +Twas brillig at 15:33:01 17.11.2009 UTC-05 when lars at seas.harvard.edu +did gyre and gimble: LK> Is the list archived anywhere? The obvious archives LK> (http://notmuchmail.org/pipermail/notmuch/) aren't available, and I @@ -127,14 +127,15 @@ Name: not available Type: application/pgp-signature Size: 834 bytes Desc: not available -URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20091118/0e33d964/attachment.pgp> - +URL: +<http://notmuchmail.org/pipermail/notmuch/attachments/20091118/0e33d964/attachment.pgp> Keith Packard <keithp@keithp.com> (2009-11-17) (inbox unread) Subject: [notmuch] Working with Maildir storage? To: notmuch@notmuchmail.org Date: Tue, 17 Nov 2009 13:24:13 -0800 -On Tue, 17 Nov 2009 15:33:01 -0500, Lars Kellogg-Stedman <lars at seas.harvard.edu> wrote: +On Tue, 17 Nov 2009 15:33:01 -0500, Lars Kellogg-Stedman <lars at +seas.harvard.edu> wrote: > > See the patch just posted here. I've also pushed a slightly more complicated (and complete) fix to my @@ -150,7 +151,6 @@ Barcelona today and so it won't get fixed for a while. Thanks to everyone for trying out notmuch! -keith - Lars Kellogg-Stedman <lars@seas.harvard.edu> (2009-11-18) (inbox signed unread) Subject: Re: [notmuch] Working with Maildir storage? To: Keith Packard <keithp@keithp.com> @@ -166,12 +166,11 @@ Date: Tue, 17 Nov 2009 19:50:40 -0500 The version of lib/messages.cc in your repo doesn't build because it's missing "#include <stdint.h>" (for the uint32_t on line 466). -[ 5-line signature. Click/Enter to show. ] +[ 4-line signature. Click/Enter to show. ] -- Lars Kellogg-Stedman <lars@seas.harvard.edu> Senior Technologist, Computing and Information Technology Harvard University School of Engineering and Applied Sciences - [ application/pgp-signature ] [ text/plain ] [ 4-line signature. Click/Enter to show. ] @@ -184,7 +183,8 @@ Subject: [notmuch] Working with Maildir storage? To: notmuch@notmuchmail.org Date: Wed, 18 Nov 2009 02:08:10 -0800 -On Tue, 17 Nov 2009 14:00:54 -0500, Lars Kellogg-Stedman <lars at seas.harvard.edu> wrote: +On Tue, 17 Nov 2009 14:00:54 -0500, Lars Kellogg-Stedman <lars at +seas.harvard.edu> wrote: > I saw the LWN article and decided to take a look at notmuch. I'm > currently using mutt and mairix to index and read a collection of > Maildir mail folders (around 40,000 messages total). @@ -195,7 +195,7 @@ I hadn't even seen that Keith's blog post had been picked up by lwn.net. That's very interesting. So, thanks for coming and trying out notmuch. > Error opening -> /home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S: +> /home/lars/Mail/read-messages.2008/cur/1246413773.24928_27334.hostname,U=3026:2,S: > Too many open files Sadly, the lwn article coincided with me having just introduced this @@ -212,4 +212,3 @@ likes the best. Happy hacking, -Carl - diff --git a/test/encoding b/test/encoding index 673b0394..e875c8b1 100755 --- a/test/encoding +++ b/test/encoding @@ -12,7 +12,7 @@ Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox unread) Subject: Test message #1 From: Notmuch Test Suite <test_suite@notmuchmail.org> To: Notmuch Test Suite <test_suite@notmuchmail.org> -Date: Tue, 05 Jan 2001 15:43:57 -0000 +Date: Fri, 05 Jan 2001 15:43:57 +0000 header} body{ part{ ID: 1, Content-type: text/plain diff --git a/test/maildir-sync b/test/maildir-sync index a60854f8..d5872a53 100755 --- a/test/maildir-sync +++ b/test/maildir-sync @@ -55,8 +55,8 @@ test_expect_equal "$output" '[[[{"id": "adding-replied-tag@notmuch-test-suite", "To": "Notmuch Test Suite <test_suite@notmuchmail.org>", "Cc": "", "Bcc": "", -"Date": "Tue, -05 Jan 2001 15:43:57 -0000"}, +"Date": "Fri, +05 Jan 2001 15:43:57 +0000"}, "body": [{"id": 1, "content-type": "text/plain", "content": "This is just a test message (#3)\n"}]}, diff --git a/test/notmuch-test b/test/notmuch-test index ded79e8f..e40ef86a 100755 --- a/test/notmuch-test +++ b/test/notmuch-test @@ -42,6 +42,7 @@ TESTS=" encoding emacs emacs-large-search-buffer + emacs-subject-to-filename maildir-sync crypto symbol-hiding diff --git a/test/python b/test/python index c3aa7266..6018c2d0 100755 --- a/test/python +++ b/test/python @@ -7,11 +7,25 @@ add_email_corpus test_begin_subtest "compare thread ids" test_python <<EOF import notmuch -db = notmuch.Database(mode=notmuch.Database.MODE.READ_WRITE) +db = notmuch.Database(mode=notmuch.Database.MODE.READ_ONLY) q_new = notmuch.Query(db, 'tag:inbox') +q_new.set_sort(notmuch.Query.SORT.OLDEST_FIRST) for t in q_new.search_threads(): print t.get_thread_id() EOF -notmuch search --output=threads tag:inbox | sed s/^thread:// | sort > EXPECTED -test_expect_equal_file <(sort OUTPUT) EXPECTED +notmuch search --sort=oldest-first --output=threads tag:inbox | sed s/^thread:// > EXPECTED +test_expect_equal_file OUTPUT EXPECTED + +test_begin_subtest "compare message ids" +test_python <<EOF +import notmuch +db = notmuch.Database(mode=notmuch.Database.MODE.READ_ONLY) +q_new = notmuch.Query(db, 'tag:inbox') +q_new.set_sort(notmuch.Query.SORT.OLDEST_FIRST) +for m in q_new.search_messages(): + print m.get_message_id() +EOF +notmuch search --sort=oldest-first --output=messages tag:inbox | sed s/^id:// > EXPECTED +test_expect_equal_file OUTPUT EXPECTED + test_done @@ -19,7 +19,7 @@ test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.or To: Notmuch Test Suite <test_suite@notmuchmail.org> Message-Id: <msg-001@notmuch-test-suite> Subject: Test message #1 -Date: Tue, 05 Jan 2001 15:43:57 -0000 +Date: Fri, 05 Jan 2001 15:43:57 +0000 This is just a test message (#1)" @@ -29,7 +29,7 @@ test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.or To: Notmuch Test Suite <test_suite@notmuchmail.org> Message-Id: <msg-002@notmuch-test-suite> Subject: Test message #2 -Date: Tue, 05 Jan 2001 15:43:57 -0000 +Date: Fri, 05 Jan 2001 15:43:57 +0000 This is just a test message (#2)" diff --git a/test/search b/test/search index e7c8c54b..a7a0b18d 100755 --- a/test/search +++ b/test/search @@ -79,8 +79,11 @@ output=$(notmuch search 'subject:"subject search test (phrase)"' | notmuch_searc test_expect_equal "$output" "thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; subject search test (phrase) (inbox unread)" test_begin_subtest 'Search for all messages ("*")' -output=$(notmuch search '*' | notmuch_search_sanitize) -test_expect_equal "$output" "thread:XXX 2009-11-18 [1/1] Chris Wilson; [notmuch] [PATCH 1/2] Makefile: evaluate pkg-config once (inbox unread) +notmuch search '*' | notmuch_search_sanitize > OUTPUT +cat <<EOF >EXPECTED +thread:XXX 2010-12-29 [1/1] François Boulogne; [aur-general] Guidelines: cp, mkdir vs install (inbox unread) +thread:XXX 2010-12-16 [1/1] Olivier Berger; Essai accentué (inbox unread) +thread:XXX 2009-11-18 [1/1] Chris Wilson; [notmuch] [PATCH 1/2] Makefile: evaluate pkg-config once (inbox unread) thread:XXX 2009-11-18 [2/2] Alex Botero-Lowry, Carl Worth; [notmuch] [PATCH] Error out if no query is supplied to search instead of going into an infinite loop (attachment inbox unread) thread:XXX 2009-11-18 [2/2] Ingmar Vanhassel, Carl Worth; [notmuch] [PATCH] Typsos (inbox unread) thread:XXX 2009-11-18 [3/3] Adrian Perez de Castro, Keith Packard, Carl Worth; [notmuch] Introducing myself (inbox signed unread) @@ -99,7 +102,7 @@ thread:XXX 2009-11-18 [1/1] Jan Janak; [notmuch] [PATCH] notmuch new: Support thread:XXX 2009-11-18 [1/1] Stewart Smith; [notmuch] [PATCH] count_files: sort directory in inode order before statting (inbox unread) thread:XXX 2009-11-18 [1/1] Stewart Smith; [notmuch] [PATCH 2/2] Read mail directory in inode number order (inbox unread) thread:XXX 2009-11-18 [1/1] Stewart Smith; [notmuch] [PATCH] Fix linking with gcc to use g++ to link in C++ libs. (inbox unread) -thread:XXX 2009-11-18 [2/2] Lars Kellogg-Stedman; [notmuch] \"notmuch help\" outputs to stderr? (attachment inbox signed unread) +thread:XXX 2009-11-18 [2/2] Lars Kellogg-Stedman; [notmuch] "notmuch help" outputs to stderr? (attachment inbox signed unread) thread:XXX 2009-11-17 [1/1] Mikhail Gusarov; [notmuch] [PATCH] Handle rename of message file (inbox unread) thread:XXX 2009-11-17 [2/2] Alex Botero-Lowry, Carl Worth; [notmuch] preliminary FreeBSD support (attachment inbox unread) thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; body search (inbox unread) @@ -117,7 +120,9 @@ thread:XXX 2000-01-01 [1/1] Search By From Name; search by from (name) (inbox thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; search by to (address) (inbox unread) thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; search by to (name) (inbox unread) thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; subject search test (phrase) (inbox unread) -thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; this phrase should not match the subject search test (inbox unread)" +thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; this phrase should not match the subject search test (inbox unread) +EOF +test_expect_equal_file OUTPUT EXPECTED test_begin_subtest "Search body (utf-8):" add_message '[subject]="utf8-message-body-subject"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' '[body]="message body utf8: bödý"' diff --git a/test/search-output b/test/search-output index 10291c3b..8b57a432 100755 --- a/test/search-output +++ b/test/search-output @@ -29,6 +29,8 @@ thread:THREADID thread:THREADID thread:THREADID thread:THREADID +thread:THREADID +thread:THREADID EOF test_expect_equal_file OUTPUT EXPECTED @@ -56,6 +58,8 @@ cat <<EOF >EXPECTED "THREADID", "THREADID", "THREADID", +"THREADID", +"THREADID", "THREADID"] EOF test_expect_equal_file OUTPUT EXPECTED @@ -63,6 +67,8 @@ test_expect_equal_file OUTPUT EXPECTED test_begin_subtest "--output=messages" notmuch search --output=messages '*' >OUTPUT cat <<EOF >EXPECTED +id:4EFC743A.3060609@april.org +id:877h1wv7mg.fsf@inf-8657.int-evry.fr id:1258544095-16616-1-git-send-email-chris@chris-wilson.co.uk id:877htoqdbo.fsf@yoom.home.cworth.org id:878we4qdqf.fsf@yoom.home.cworth.org @@ -119,7 +125,9 @@ test_expect_equal_file OUTPUT EXPECTED test_begin_subtest "--output=messages --format=json" notmuch search --format=json --output=messages '*' >OUTPUT cat <<EOF >EXPECTED -["1258544095-16616-1-git-send-email-chris@chris-wilson.co.uk", +["4EFC743A.3060609@april.org", +"877h1wv7mg.fsf@inf-8657.int-evry.fr", +"1258544095-16616-1-git-send-email-chris@chris-wilson.co.uk", "877htoqdbo.fsf@yoom.home.cworth.org", "878we4qdqf.fsf@yoom.home.cworth.org", "87aaykqe24.fsf@yoom.home.cworth.org", @@ -175,6 +183,8 @@ test_expect_equal_file OUTPUT EXPECTED test_begin_subtest "--output=files" notmuch search --output=files '*' | sed -e "s,$MAIL_DIR,MAIL_DIR," >OUTPUT cat <<EOF >EXPECTED +MAIL_DIR/cur/52:2, +MAIL_DIR/cur/53:2, MAIL_DIR/cur/50:2, MAIL_DIR/cur/49:2, MAIL_DIR/cur/48:2, @@ -232,7 +242,9 @@ test_expect_equal_file OUTPUT EXPECTED test_begin_subtest "--output=files --format=json" notmuch search --format=json --output=files '*' | sed -e "s,$MAIL_DIR,MAIL_DIR," >OUTPUT cat <<EOF >EXPECTED -["MAIL_DIR/cur/50:2,", +["MAIL_DIR/cur/52:2,", +"MAIL_DIR/cur/53:2,", +"MAIL_DIR/cur/50:2,", "MAIL_DIR/cur/49:2,", "MAIL_DIR/cur/48:2,", "MAIL_DIR/cur/47:2,", diff --git a/test/symbol-hiding b/test/symbol-hiding index 68f0d1b1..7fa7b2aa 100755 --- a/test/symbol-hiding +++ b/test/symbol-hiding @@ -12,7 +12,7 @@ test_description='exception symbol hiding' . ./test-lib.sh run_test(){ - result=$(LD_LIBRARY_PATH=$TEST_DIRECTORY/../lib $TEST_DIRECTORY/symbol-test 2>&1) + result=$(LD_LIBRARY_PATH="$TEST_DIRECTORY/../lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $TEST_DIRECTORY/symbol-test 2>&1) } output="A Xapian exception occurred opening database: Couldn't stat 'fakedb/.notmuch/xapian' diff --git a/test/test-lib.sh b/test/test-lib.sh index b5e346c0..82767c07 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -1,4 +1,3 @@ -#!/usr/bin/env bash # # Copyright (c) 2005 Junio C Hamano # @@ -50,6 +49,7 @@ TZ=UTC TERM=dumb export LANG LC_ALL PAGER TERM TZ GIT_TEST_CMP=${GIT_TEST_CMP:-diff -u} +TEST_EMACS=${TEST_EMACS:-${EMACS:-emacs}} # Protect ourselves from common misconfiguration to export # CDPATH into the environment @@ -322,7 +322,7 @@ generate_message () fi if [ -z "${template[date]}" ]; then - template[date]="Tue, 05 Jan 2001 15:43:57 -0000" + template[date]="Fri, 05 Jan 2001 15:43:57 +0000" fi additional_headers="" @@ -897,7 +897,7 @@ export NOTMUCH_CONFIG=$NOTMUCH_CONFIG # # --load Force loading of notmuch.el and test-lib.el -exec emacs --no-init-file --no-site-file \ +exec ${TEST_EMACS} --no-init-file --no-site-file \ --directory "$TEST_DIRECTORY/../emacs" --load notmuch.el \ --directory "$TEST_DIRECTORY" --load test-lib.el \ "\$@" |