]> git.notmuchmail.org Git - notmuch/commitdiff
test: whitespace-cleanup for most test/* files
authorTomi Ollila <tomi.ollila@iki.fi>
Wed, 11 Jan 2012 16:53:59 +0000 (18:53 +0200)
committerDavid Bremner <bremner@debian.org>
Sun, 22 Jan 2012 13:12:12 +0000 (09:12 -0400)
Used emacs (whitespace-cleanup) function to "cleanup blank problems"
in test files where that could be done without breaking tests;
test/emacs was partially, and test/multipart was fully reverted.

test/emacs
test/encoding
test/from-guessing
test/reply
test/search-position-overlap-bug
test/symbol-hiding
test/test-lib.sh
test/thread-naming

index ac47b161f837be4f325101c8305ab499867e376f..f150d95e0f709f378af76c1ee09694d8f3b8af43 100755 (executable)
@@ -225,7 +225,7 @@ test_expect_equal_file OUTPUT EXPECTED
 mkdir -p mail/sent-list-catch-all/cur
 mkdir -p mail/sent-list-catch-all/new
 mkdir -p mail/sent-list-catch-all/tmp
 mkdir -p mail/sent-list-catch-all/cur
 mkdir -p mail/sent-list-catch-all/new
 mkdir -p mail/sent-list-catch-all/tmp
+
 test_begin_subtest "notmuch-fcc-dirs set to a list (catch-all)"
 test_emacs "(let ((notmuch-fcc-dirs
                   '((\"example.com\" . \"failure\")
 test_begin_subtest "notmuch-fcc-dirs set to a list (catch-all)"
 test_emacs "(let ((notmuch-fcc-dirs
                   '((\"example.com\" . \"failure\")
@@ -373,22 +373,22 @@ add_message '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' \
     '[body]="Unable to stash body. Where did you get it in the first place?!?"'
 notmuch tag +stashtest id:${gen_msg_id}
 test_emacs '(notmuch-show "id:\"bought\"")
     '[body]="Unable to stash body. Where did you get it in the first place?!?"'
 notmuch tag +stashtest id:${gen_msg_id}
 test_emacs '(notmuch-show "id:\"bought\"")
-        (notmuch-show-stash-date)
-        (notmuch-show-stash-from)
-        (notmuch-show-stash-to)
-        (notmuch-show-stash-cc)
-        (notmuch-show-stash-subject)
-        (notmuch-show-stash-message-id)
-        (notmuch-show-stash-message-id-stripped)
-        (notmuch-show-stash-tags)
-        (notmuch-show-stash-filename)
-        (switch-to-buffer
-          (generate-new-buffer "*test-stashing*"))
-        (dotimes (i 9)
-          (yank)
-          (insert "\n")
-          (rotate-yank-pointer 1))
-        (reverse-region (point-min) (point-max))
+       (notmuch-show-stash-date)
+       (notmuch-show-stash-from)
+       (notmuch-show-stash-to)
+       (notmuch-show-stash-cc)
+       (notmuch-show-stash-subject)
+       (notmuch-show-stash-message-id)
+       (notmuch-show-stash-message-id-stripped)
+       (notmuch-show-stash-tags)
+       (notmuch-show-stash-filename)
+       (switch-to-buffer
+         (generate-new-buffer "*test-stashing*"))
+       (dotimes (i 9)
+         (yank)
+         (insert "\n")
+         (rotate-yank-pointer 1))
+       (reverse-region (point-min) (point-max))
            (test-output)'
 cat <<EOF >EXPECTED
 Sat, 01 Jan 2000 12:00:00 -0000
            (test-output)'
 cat <<EOF >EXPECTED
 Sat, 01 Jan 2000 12:00:00 -0000
@@ -405,11 +405,11 @@ test_expect_equal_file OUTPUT EXPECTED
 
 test_begin_subtest "Stashing in notmuch-search"
 test_emacs '(notmuch-search "id:\"bought\"")
 
 test_begin_subtest "Stashing in notmuch-search"
 test_emacs '(notmuch-search "id:\"bought\"")
-        (notmuch-test-wait)
-        (notmuch-search-stash-thread-id)
-        (switch-to-buffer
-          (generate-new-buffer "*test-stashing*"))
-        (yank)
+       (notmuch-test-wait)
+       (notmuch-search-stash-thread-id)
+       (switch-to-buffer
+         (generate-new-buffer "*test-stashing*"))
+       (yank)
            (test-output)'
 sed -i -e 's/^thread:.*$/thread:XXX/' OUTPUT
 test_expect_equal "$(cat OUTPUT)" "thread:XXX"
            (test-output)'
 sed -i -e 's/^thread:.*$/thread:XXX/' OUTPUT
 test_expect_equal "$(cat OUTPUT)" "thread:XXX"
@@ -438,9 +438,9 @@ test_expect_equal_file OUTPUT EXPECTED
 test_begin_subtest "Refresh modified show buffer"
 test_subtest_known_broken
 test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com")
 test_begin_subtest "Refresh modified show buffer"
 test_subtest_known_broken
 test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com")
-            (notmuch-show-toggle-message)
-            (notmuch-show-next-message)
-            (notmuch-show-toggle-message)
+           (notmuch-show-toggle-message)
+           (notmuch-show-next-message)
+           (notmuch-show-toggle-message)
            (test-visible-output "EXPECTED")
            (notmuch-show-refresh-view)
            (test-visible-output)'
            (test-visible-output "EXPECTED")
            (notmuch-show-refresh-view)
            (test-visible-output)'
index e875c8b1f4f8348f0e2156d2a9938b1e1f659ef1..33259c1448fb8b0fc6b8943c2d9ceb1d81af661c 100755 (executable)
@@ -4,7 +4,7 @@ test_description="encoding issues"
 
 test_begin_subtest "Message with text of unknown charset"
 add_message '[content-type]="text/plain; charset=unknown-8bit"' \
 
 test_begin_subtest "Message with text of unknown charset"
 add_message '[content-type]="text/plain; charset=unknown-8bit"' \
-            "[body]=irrelevant"
+           "[body]=irrelevant"
 output=$(notmuch show id:${gen_msg_id} 2>&1 | notmuch_show_sanitize)
 test_expect_equal "$output" "\fmessage{ id:msg-001@notmuch-test-suite depth:0 match:1 filename:/XXX/mail/msg-001
 \fheader{
 output=$(notmuch show id:${gen_msg_id} 2>&1 | notmuch_show_sanitize)
 test_expect_equal "$output" "\fmessage{ id:msg-001@notmuch-test-suite depth:0 match:1 filename:/XXX/mail/msg-001
 \fheader{
index 8b69cf6c7573767a7abad81b725cc39379e68eb5..6dfaa40a9478ccdc6bf415ff0fb4fe66d89c88d7 100755 (executable)
@@ -4,10 +4,10 @@ test_description="From line heuristics (with multiple configured addresses)"
 
 test_begin_subtest "Magic from guessing (nothing to go on)"
 add_message '[from]="Sender <sender@example.com>"' \
 
 test_begin_subtest "Magic from guessing (nothing to go on)"
 add_message '[from]="Sender <sender@example.com>"' \
-             [to]=mailinglist@notmuchmail.org \
-             [subject]=notmuch-reply-test \
-            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
-            '[body]="from guessing test"'
+            [to]=mailinglist@notmuchmail.org \
+            [subject]=notmuch-reply-test \
+           '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
+           '[body]="from guessing test"'
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
@@ -21,11 +21,11 @@ On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
 
 test_begin_subtest "Magic from guessing (Envelope-to:)"
 add_message '[from]="Sender <sender@example.com>"' \
 
 test_begin_subtest "Magic from guessing (Envelope-to:)"
 add_message '[from]="Sender <sender@example.com>"' \
-             [to]=mailinglist@notmuchmail.org \
-             [subject]=notmuch-reply-test \
-            '[header]="Envelope-To: test_suite_other@notmuchmail.org"' \
-            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
-            '[body]="from guessing test"'
+            [to]=mailinglist@notmuchmail.org \
+            [subject]=notmuch-reply-test \
+           '[header]="Envelope-To: test_suite_other@notmuchmail.org"' \
+           '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
+           '[body]="from guessing test"'
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite_other@notmuchmail.org>
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite_other@notmuchmail.org>
@@ -39,11 +39,11 @@ On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
 
 test_begin_subtest "Magic from guessing (X-Original-To:)"
 add_message '[from]="Sender <sender@example.com>"' \
 
 test_begin_subtest "Magic from guessing (X-Original-To:)"
 add_message '[from]="Sender <sender@example.com>"' \
-             [to]=mailinglist@notmuchmail.org \
-             [subject]=notmuch-reply-test \
-            '[header]="X-Original-To: test_suite_other@notmuchmail.org"' \
-            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
-            '[body]="from guessing test"'
+            [to]=mailinglist@notmuchmail.org \
+            [subject]=notmuch-reply-test \
+           '[header]="X-Original-To: test_suite_other@notmuchmail.org"' \
+           '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
+           '[body]="from guessing test"'
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite_other@notmuchmail.org>
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite_other@notmuchmail.org>
@@ -57,13 +57,13 @@ On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
 
 test_begin_subtest "Magic from guessing (Received: .. for ..)"
 add_message '[from]="Sender <sender@example.com>"' \
 
 test_begin_subtest "Magic from guessing (Received: .. for ..)"
 add_message '[from]="Sender <sender@example.com>"' \
-             [to]=mailinglist@notmuchmail.org \
-             [subject]=notmuch-reply-test \
-            "[header]=\"Received: from mail.example.com (mail.example.com [1.1.1.1])
-        by mail.notmuchmail.org (some MTA) with ESMTP id 12345678
-        for <test_suite_other@notmuchmail.org>; Sat, 10 Apr 2010 07:54:51 -0400 (EDT)\"" \
-            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
-            '[body]="from guessing test"'
+            [to]=mailinglist@notmuchmail.org \
+            [subject]=notmuch-reply-test \
+           "[header]=\"Received: from mail.example.com (mail.example.com [1.1.1.1])
+       by mail.notmuchmail.org (some MTA) with ESMTP id 12345678
+       for <test_suite_other@notmuchmail.org>; Sat, 10 Apr 2010 07:54:51 -0400 (EDT)\"" \
+           '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
+           '[body]="from guessing test"'
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite_other@notmuchmail.org>
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite_other@notmuchmail.org>
@@ -77,13 +77,13 @@ On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
 
 test_begin_subtest "Magic from guessing (Received: domain)"
 add_message '[from]="Sender <sender@example.com>"' \
 
 test_begin_subtest "Magic from guessing (Received: domain)"
 add_message '[from]="Sender <sender@example.com>"' \
-             [to]=mailinglist@notmuchmail.org \
-             [subject]=notmuch-reply-test \
-            "[header]=\"Received: from mail.example.com (mail.example.com [1.1.1.1])
-        by mail.otherdomain.org (some MTA) with ESMTP id 12345678
-        Sat, 10 Apr 2010 07:54:51 -0400 (EDT)\"" \
-            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
-            '[body]="from guessing test"'
+            [to]=mailinglist@notmuchmail.org \
+            [subject]=notmuch-reply-test \
+           "[header]=\"Received: from mail.example.com (mail.example.com [1.1.1.1])
+       by mail.otherdomain.org (some MTA) with ESMTP id 12345678
+       Sat, 10 Apr 2010 07:54:51 -0400 (EDT)\"" \
+           '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
+           '[body]="from guessing test"'
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@otherdomain.org>
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@otherdomain.org>
@@ -97,15 +97,15 @@ On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
 
 test_begin_subtest "Magic from guessing (multiple Received: headers)"
 add_message '[from]="Sender <sender@example.com>"' \
 
 test_begin_subtest "Magic from guessing (multiple Received: headers)"
 add_message '[from]="Sender <sender@example.com>"' \
-             [to]=mailinglist@notmuchmail.org \
-             [subject]=notmuch-reply-test \
-            "[header]=\"Received: from extraneous.example.com (extraneous.example.com [1.1.1.1])
+            [to]=mailinglist@notmuchmail.org \
+            [subject]=notmuch-reply-test \
+           "[header]=\"Received: from extraneous.example.com (extraneous.example.com [1.1.1.1])
 Received: from mail.example.com (mail.example.com [1.1.1.1])
 Received: from mail.example.com (mail.example.com [1.1.1.1])
-        by mail.otherdomain.org (some MTA) with ESMTP id 12345678
-        for <test_suite_other@notmuchmail.org>; Sat, 10 Apr 2010 07:54:51 -0400 (EDT)
+       by mail.otherdomain.org (some MTA) with ESMTP id 12345678
+       for <test_suite_other@notmuchmail.org>; Sat, 10 Apr 2010 07:54:51 -0400 (EDT)
 Received: from extraneous.example.com (extraneous.example.com [1.1.1.1])\"" \
 Received: from extraneous.example.com (extraneous.example.com [1.1.1.1])\"" \
-            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
-            '[body]="from guessing test"'
+           '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
+           '[body]="from guessing test"'
 
 output="$(notmuch reply id:${gen_msg_id})"
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite_other@notmuchmail.org>
 
 output="$(notmuch reply id:${gen_msg_id})"
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite_other@notmuchmail.org>
@@ -123,10 +123,10 @@ test_expect_equal '' ''
 
 test_begin_subtest "Magic from guessing (nothing to go on)"
 add_message '[from]="Sender <sender@example.com>"' \
 
 test_begin_subtest "Magic from guessing (nothing to go on)"
 add_message '[from]="Sender <sender@example.com>"' \
-             [to]=mailinglist@notmuchmail.org \
-             [subject]=notmuch-reply-test \
-            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
-            '[body]="from guessing test"'
+            [to]=mailinglist@notmuchmail.org \
+            [subject]=notmuch-reply-test \
+           '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
+           '[body]="from guessing test"'
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
@@ -140,11 +140,11 @@ On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
 
 test_begin_subtest "Magic from guessing (Envelope-to:)"
 add_message '[from]="Sender <sender@example.com>"' \
 
 test_begin_subtest "Magic from guessing (Envelope-to:)"
 add_message '[from]="Sender <sender@example.com>"' \
-             [to]=mailinglist@notmuchmail.org \
-             [subject]=notmuch-reply-test \
-            '[header]="Envelope-To: test_suite_other@notmuchmail.org"' \
-            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
-            '[body]="from guessing test"'
+            [to]=mailinglist@notmuchmail.org \
+            [subject]=notmuch-reply-test \
+           '[header]="Envelope-To: test_suite_other@notmuchmail.org"' \
+           '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
+           '[body]="from guessing test"'
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
@@ -158,11 +158,11 @@ On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
 
 test_begin_subtest "Magic from guessing (X-Original-To:)"
 add_message '[from]="Sender <sender@example.com>"' \
 
 test_begin_subtest "Magic from guessing (X-Original-To:)"
 add_message '[from]="Sender <sender@example.com>"' \
-             [to]=mailinglist@notmuchmail.org \
-             [subject]=notmuch-reply-test \
-            '[header]="X-Original-To: test_suite_other@notmuchmail.org"' \
-            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
-            '[body]="from guessing test"'
+            [to]=mailinglist@notmuchmail.org \
+            [subject]=notmuch-reply-test \
+           '[header]="X-Original-To: test_suite_other@notmuchmail.org"' \
+           '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
+           '[body]="from guessing test"'
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
@@ -176,13 +176,13 @@ On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
 
 test_begin_subtest "Magic from guessing (Received: .. for ..)"
 add_message '[from]="Sender <sender@example.com>"' \
 
 test_begin_subtest "Magic from guessing (Received: .. for ..)"
 add_message '[from]="Sender <sender@example.com>"' \
-             [to]=mailinglist@notmuchmail.org \
-             [subject]=notmuch-reply-test \
-            "[header]=\"Received: from mail.example.com (mail.example.com [1.1.1.1])
-        by mail.notmuchmail.org (some MTA) with ESMTP id 12345678
-        for <test_suite_other@notmuchmail.org>; Sat, 10 Apr 2010 07:54:51 -0400 (EDT)\"" \
-            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
-            '[body]="from guessing test"'
+            [to]=mailinglist@notmuchmail.org \
+            [subject]=notmuch-reply-test \
+           "[header]=\"Received: from mail.example.com (mail.example.com [1.1.1.1])
+       by mail.notmuchmail.org (some MTA) with ESMTP id 12345678
+       for <test_suite_other@notmuchmail.org>; Sat, 10 Apr 2010 07:54:51 -0400 (EDT)\"" \
+           '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
+           '[body]="from guessing test"'
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
@@ -196,13 +196,13 @@ On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
 
 test_begin_subtest "Magic from guessing (Received: domain)"
 add_message '[from]="Sender <sender@example.com>"' \
 
 test_begin_subtest "Magic from guessing (Received: domain)"
 add_message '[from]="Sender <sender@example.com>"' \
-             [to]=mailinglist@notmuchmail.org \
-             [subject]=notmuch-reply-test \
-            "[header]=\"Received: from mail.example.com (mail.example.com [1.1.1.1])
-        by mail.otherdomain.org (some MTA) with ESMTP id 12345678
-        Sat, 10 Apr 2010 07:54:51 -0400 (EDT)\"" \
-            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
-            '[body]="from guessing test"'
+            [to]=mailinglist@notmuchmail.org \
+            [subject]=notmuch-reply-test \
+           "[header]=\"Received: from mail.example.com (mail.example.com [1.1.1.1])
+       by mail.otherdomain.org (some MTA) with ESMTP id 12345678
+       Sat, 10 Apr 2010 07:54:51 -0400 (EDT)\"" \
+           '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
+           '[body]="from guessing test"'
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
index e4e16eb172d725647db097d3483692cccf7b50d4..00f4beadea8b8947b9f58730611d97991eaa4175 100755 (executable)
@@ -4,10 +4,10 @@ test_description="\"notmuch reply\" in several variations"
 
 test_begin_subtest "Basic reply"
 add_message '[from]="Sender <sender@example.com>"' \
 
 test_begin_subtest "Basic reply"
 add_message '[from]="Sender <sender@example.com>"' \
-             [to]=test_suite@notmuchmail.org \
-             [subject]=notmuch-reply-test \
-            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
-            '[body]="basic reply test"'
+            [to]=test_suite@notmuchmail.org \
+            [subject]=notmuch-reply-test \
+           '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
+           '[body]="basic reply test"'
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
@@ -21,10 +21,10 @@ On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
 
 test_begin_subtest "Multiple recipients"
 add_message '[from]="Sender <sender@example.com>"' \
 
 test_begin_subtest "Multiple recipients"
 add_message '[from]="Sender <sender@example.com>"' \
-            '[to]="test_suite@notmuchmail.org, Someone Else <someone@example.com>"' \
-             [subject]=notmuch-reply-test \
-            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
-            '[body]="Multiple recipients"'
+           '[to]="test_suite@notmuchmail.org, Someone Else <someone@example.com>"' \
+            [subject]=notmuch-reply-test \
+           '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
+           '[body]="Multiple recipients"'
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
@@ -38,11 +38,11 @@ On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
 
 test_begin_subtest "Reply with CC"
 add_message '[from]="Sender <sender@example.com>"' \
 
 test_begin_subtest "Reply with CC"
 add_message '[from]="Sender <sender@example.com>"' \
-             [to]=test_suite@notmuchmail.org \
-            '[cc]="Other Parties <cc@example.com>"' \
-             [subject]=notmuch-reply-test \
-            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
-            '[body]="reply with CC"'
+            [to]=test_suite@notmuchmail.org \
+           '[cc]="Other Parties <cc@example.com>"' \
+            [subject]=notmuch-reply-test \
+           '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
+           '[body]="reply with CC"'
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
@@ -57,10 +57,10 @@ On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
 
 test_begin_subtest "Reply from alternate address"
 add_message '[from]="Sender <sender@example.com>"' \
 
 test_begin_subtest "Reply from alternate address"
 add_message '[from]="Sender <sender@example.com>"' \
-             [to]=test_suite_other@notmuchmail.org \
-             [subject]=notmuch-reply-test \
-            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
-            '[body]="reply from alternate address"'
+            [to]=test_suite_other@notmuchmail.org \
+            [subject]=notmuch-reply-test \
+           '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
+           '[body]="reply from alternate address"'
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite_other@notmuchmail.org>
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite_other@notmuchmail.org>
@@ -92,11 +92,11 @@ On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
 
 test_begin_subtest "Support for Reply-To"
 add_message '[from]="Sender <sender@example.com>"' \
 
 test_begin_subtest "Support for Reply-To"
 add_message '[from]="Sender <sender@example.com>"' \
-             [to]=test_suite@notmuchmail.org \
-             [subject]=notmuch-reply-test \
-            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
-            '[body]="support for reply-to"' \
-            '[reply-to]="Sender <elsewhere@example.com>"'
+            [to]=test_suite@notmuchmail.org \
+            [subject]=notmuch-reply-test \
+           '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
+           '[body]="support for reply-to"' \
+           '[reply-to]="Sender <elsewhere@example.com>"'
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
@@ -110,11 +110,11 @@ On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
 
 test_begin_subtest "Un-munging Reply-To"
 add_message '[from]="Sender <sender@example.com>"' \
 
 test_begin_subtest "Un-munging Reply-To"
 add_message '[from]="Sender <sender@example.com>"' \
-            '[to]="Some List <list@example.com>"' \
-             [subject]=notmuch-reply-test \
-            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
-            '[body]="Un-munging Reply-To"' \
-            '[reply-to]="Evil Munging List <list@example.com>"'
+           '[to]="Some List <list@example.com>"' \
+            [subject]=notmuch-reply-test \
+           '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
+           '[body]="Un-munging Reply-To"' \
+           '[reply-to]="Evil Munging List <list@example.com>"'
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
 
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
@@ -128,8 +128,8 @@ On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote:
 
 test_begin_subtest "Message with header of exactly 200 bytes"
 add_message '[subject]="This subject is exactly 200 bytes in length. Other than its length there is not much of note here. Note that the length of 200 bytes includes the Subject: and Re: prefixes with two spaces"' \
 
 test_begin_subtest "Message with header of exactly 200 bytes"
 add_message '[subject]="This subject is exactly 200 bytes in length. Other than its length there is not much of note here. Note that the length of 200 bytes includes the Subject: and Re: prefixes with two spaces"' \
-            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
-            '[body]="200-byte header"'
+           '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
+           '[body]="200-byte header"'
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
 Subject: Re: This subject is exactly 200 bytes in length. Other than its length there is not much of note here. Note that the length of 200 bytes includes the Subject: and Re: prefixes with two spaces
 output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
 Subject: Re: This subject is exactly 200 bytes in length. Other than its length there is not much of note here. Note that the length of 200 bytes includes the Subject: and Re: prefixes with two spaces
index 414b8d524fd672d3bc861f98f2dc5b772e07cf1f..5da6ad6f2ef7ee018e7b605d7442137e68a8f172 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 
 # Test to demonstrate a position overlap bug.
 #!/usr/bin/env bash
 
 # Test to demonstrate a position overlap bug.
-#    
+#
 # At one point, notmuch would index terms incorrectly in the case of
 # calling index_terms multiple times for a single field. The term
 # generator was being reset to position 0 each time. This means that
 # At one point, notmuch would index terms incorrectly in the case of
 # calling index_terms multiple times for a single field. The term
 # generator was being reset to position 0 each time. This means that
@@ -12,7 +12,7 @@
 # one could get a bogus match by searching for:
 #
 #      To: a@y.c
 # one could get a bogus match by searching for:
 #
 #      To: a@y.c
-#    
+#
 # Thanks to Mark Anderson for reporting the bug, (and providing a nice,
 # minimal test case that inspired what is used here), in
 # id:3wd4o8wa7fx.fsf@testarossa.amd.com
 # Thanks to Mark Anderson for reporting the bug, (and providing a nice,
 # minimal test case that inspired what is used here), in
 # id:3wd4o8wa7fx.fsf@testarossa.amd.com
index 7fa7b2aaac5635945a7162e086f577d023951878..636ec9171a2f32a9564c55d6d2a7e16277756ff5 100755 (executable)
@@ -23,7 +23,7 @@ mkdir -p fakedb/.notmuch
 test_expect_success 'running test' run_test
 
 test_begin_subtest 'checking output'
 test_expect_success 'running test' run_test
 
 test_begin_subtest 'checking output'
-test_expect_equal "$result" "$output" 
+test_expect_equal "$result" "$output"
 
 test_begin_subtest 'comparing existing to exported symbols'
 objdump -t $TEST_DIRECTORY/../lib/*.o | awk '$4 == ".text" && $6 ~ "^notmuch" {print $6}' | sort | uniq > ACTUAL
 
 test_begin_subtest 'comparing existing to exported symbols'
 objdump -t $TEST_DIRECTORY/../lib/*.o | awk '$4 == ".text" && $6 ~ "^notmuch" {print $6}' | sort | uniq > ACTUAL
index d1fbc054dde05b11c9b7646146e97f0adcd6c5a5..0da60fbbf5e3a03e9ffc0b173cb738196b71815a 100644 (file)
@@ -140,7 +140,7 @@ if test -n "$color"; then
                esac
                shift
                printf " "
                esac
                shift
                printf " "
-                printf "$@"
+               printf "$@"
                tput sgr0
                print_subtest
                )
                tput sgr0
                print_subtest
                )
@@ -150,7 +150,7 @@ else
                test -z "$1" && test -n "$quiet" && return
                shift
                printf " "
                test -z "$1" && test -n "$quiet" && return
                shift
                printf " "
-                printf "$@"
+               printf "$@"
                print_subtest
        }
 fi
                print_subtest
        }
 fi
@@ -249,7 +249,7 @@ remove_cr () {
 #      Store the message in file 'name'. The default is to store it
 #      in 'msg-<count>', where <count> is three-digit number of the
 #      message.
 #      Store the message in file 'name'. The default is to store it
 #      in 'msg-<count>', where <count> is three-digit number of the
 #      message.
-#      
+#
 #  [body]=text
 #
 #      Text to use as the body of the email message
 #  [body]=text
 #
 #      Text to use as the body of the email message
@@ -869,7 +869,7 @@ test_done () {
        [ -n "$EMACS_SERVER" ] && test_emacs '(kill-emacs)'
 
        if [ "$test_failure" = "0" ]; then
        [ -n "$EMACS_SERVER" ] && test_emacs '(kill-emacs)'
 
        if [ "$test_failure" = "0" ]; then
-           if [ "$test_broken" = "0" ]; then       
+           if [ "$test_broken" = "0" ]; then
                rm -rf "$remove_tmp"
            fi
            exit 0
                rm -rf "$remove_tmp"
            fi
            exit 0
@@ -881,7 +881,7 @@ test_done () {
 emacs_generate_script () {
        # Construct a little test script here for the benefit of the user,
        # (who can easily run "run_emacs" to get the same emacs environment
 emacs_generate_script () {
        # Construct a little test script here for the benefit of the user,
        # (who can easily run "run_emacs" to get the same emacs environment
-       # for investigating any failures).    
+       # for investigating any failures).
        cat <<EOF >"$TMP_DIRECTORY/run_emacs"
 #!/bin/sh
 export PATH=$PATH
        cat <<EOF >"$TMP_DIRECTORY/run_emacs"
 #!/bin/sh
 export PATH=$PATH
index 41b97d9c082659ed8aa154d86f864b435633859d..2ce92169723b577a985f8834c131e622e7279185 100755 (executable)
@@ -4,18 +4,18 @@ test_description="naming of threads with changing subject"
 
 test_begin_subtest "Initial thread name (oldest-first search)"
 add_message '[subject]="thread-naming: Initial thread subject"' \
 
 test_begin_subtest "Initial thread name (oldest-first search)"
 add_message '[subject]="thread-naming: Initial thread subject"' \
-            '[date]="Fri, 05 Jan 2001 15:43:56 -0000"'
+           '[date]="Fri, 05 Jan 2001 15:43:56 -0000"'
 first=${gen_msg_cnt}
 parent=${gen_msg_id}
 add_message '[subject]="thread-naming: Older changed subject"' \
 first=${gen_msg_cnt}
 parent=${gen_msg_id}
 add_message '[subject]="thread-naming: Older changed subject"' \
-            '[date]="Sat, 06 Jan 2001 15:43:56 -0000"' \
-            "[in-reply-to]=\<$parent\>"
+           '[date]="Sat, 06 Jan 2001 15:43:56 -0000"' \
+           "[in-reply-to]=\<$parent\>"
 add_message '[subject]="thread-naming: Newer changed subject"' \
 add_message '[subject]="thread-naming: Newer changed subject"' \
-            '[date]="Sun, 07 Jan 2001 15:43:56 -0000"' \
-            "[in-reply-to]=\<$parent\>"
+           '[date]="Sun, 07 Jan 2001 15:43:56 -0000"' \
+           "[in-reply-to]=\<$parent\>"
 add_message '[subject]="thread-naming: Final thread subject"' \
 add_message '[subject]="thread-naming: Final thread subject"' \
-            '[date]="Mon, 08 Jan 2001 15:43:56 -0000"' \
-            "[in-reply-to]=\<$parent\>"
+           '[date]="Mon, 08 Jan 2001 15:43:56 -0000"' \
+           "[in-reply-to]=\<$parent\>"
 final=${gen_msg_id}
 output=$(notmuch search --sort=oldest-first thread-naming and tag:inbox | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2001-01-05 [4/4] Notmuch Test Suite; thread-naming: Initial thread subject (inbox unread)"
 final=${gen_msg_id}
 output=$(notmuch search --sort=oldest-first thread-naming and tag:inbox | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2001-01-05 [4/4] Notmuch Test Suite; thread-naming: Initial thread subject (inbox unread)"
@@ -37,29 +37,29 @@ test_expect_equal "$output" "thread:XXX   2001-01-07 [2/4] Notmuch Test Suite; t
 
 test_begin_subtest "Ignore added reply prefix (Re:)"
 add_message '[subject]="Re: thread-naming: Initial thread subject"' \
 
 test_begin_subtest "Ignore added reply prefix (Re:)"
 add_message '[subject]="Re: thread-naming: Initial thread subject"' \
-            '[date]="Tue, 09 Jan 2001 15:43:45 -0000"' \
-            "[in-reply-to]=\<$parent\>"
+           '[date]="Tue, 09 Jan 2001 15:43:45 -0000"' \
+           "[in-reply-to]=\<$parent\>"
 output=$(notmuch search --sort=newest-first thread-naming and tag:inbox | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2001-01-09 [3/5] Notmuch Test Suite; thread-naming: Initial thread subject (inbox unread)"
 
 test_begin_subtest "Ignore added reply prefix (Aw:)"
 add_message '[subject]="Aw: thread-naming: Initial thread subject"' \
 output=$(notmuch search --sort=newest-first thread-naming and tag:inbox | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2001-01-09 [3/5] Notmuch Test Suite; thread-naming: Initial thread subject (inbox unread)"
 
 test_begin_subtest "Ignore added reply prefix (Aw:)"
 add_message '[subject]="Aw: thread-naming: Initial thread subject"' \
-            '[date]="Wed, 10 Jan 2001 15:43:45 -0000"' \
-            "[in-reply-to]=\<$parent\>"
+           '[date]="Wed, 10 Jan 2001 15:43:45 -0000"' \
+           "[in-reply-to]=\<$parent\>"
 output=$(notmuch search --sort=newest-first thread-naming and tag:inbox | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2001-01-10 [4/6] Notmuch Test Suite; thread-naming: Initial thread subject (inbox unread)"
 
 test_begin_subtest "Ignore added reply prefix (Vs:)"
 add_message '[subject]="Vs: thread-naming: Initial thread subject"' \
 output=$(notmuch search --sort=newest-first thread-naming and tag:inbox | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2001-01-10 [4/6] Notmuch Test Suite; thread-naming: Initial thread subject (inbox unread)"
 
 test_begin_subtest "Ignore added reply prefix (Vs:)"
 add_message '[subject]="Vs: thread-naming: Initial thread subject"' \
-            '[date]="Thu, 11 Jan 2001 15:43:45 -0000"' \
-            "[in-reply-to]=\<$parent\>"
+           '[date]="Thu, 11 Jan 2001 15:43:45 -0000"' \
+           "[in-reply-to]=\<$parent\>"
 output=$(notmuch search --sort=newest-first thread-naming and tag:inbox | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2001-01-11 [5/7] Notmuch Test Suite; thread-naming: Initial thread subject (inbox unread)"
 
 test_begin_subtest "Ignore added reply prefix (Sv:)"
 add_message '[subject]="Sv: thread-naming: Initial thread subject"' \
 output=$(notmuch search --sort=newest-first thread-naming and tag:inbox | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2001-01-11 [5/7] Notmuch Test Suite; thread-naming: Initial thread subject (inbox unread)"
 
 test_begin_subtest "Ignore added reply prefix (Sv:)"
 add_message '[subject]="Sv: thread-naming: Initial thread subject"' \
-            '[date]="Fri, 12 Jan 2001 15:43:45 -0000"' \
-            "[in-reply-to]=\<$parent\>"
+           '[date]="Fri, 12 Jan 2001 15:43:45 -0000"' \
+           "[in-reply-to]=\<$parent\>"
 output=$(notmuch search --sort=newest-first thread-naming and tag:inbox | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2001-01-12 [6/8] Notmuch Test Suite; thread-naming: Initial thread subject (inbox unread)"
 
 output=$(notmuch search --sort=newest-first thread-naming and tag:inbox | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2001-01-12 [6/8] Notmuch Test Suite; thread-naming: Initial thread subject (inbox unread)"