]> git.notmuchmail.org Git - notmuch/commitdiff
test: Remove useless NOTMUCH variable (in favor of simply "notmuch")
authorCarl Worth <cworth@cworth.org>
Mon, 20 Sep 2010 23:13:15 +0000 (16:13 -0700)
committerCarl Worth <cworth@cworth.org>
Mon, 20 Sep 2010 23:15:08 +0000 (16:15 -0700)
When the NOTMUCH variable was originally invented it was used as an
explicit path to the notmuch binary being tested. Today, the test
suite sets the PATH variable instead, so the NOTMUCH variable always
has a value of simply "notmuch".

We simplifying that by using the constant value rather than the
continual variable reference.

13 files changed:
test/author-order
test/dump-restore
test/encoding
test/from-guessing
test/json
test/long-id
test/new
test/reply
test/search
test/test-lib.sh
test/thread-naming
test/thread-order
test/uuencode

index d618b8586b196169d3fe0a928fd420c290b2e8b6..9f0b9316ef07dde0a9b98aba34e8129c1d0e2c82 100755 (executable)
@@ -18,19 +18,19 @@ output=$(NOTMUCH_NEW)
 test_expect_equal "$output" "Added 1 new message to the database."
 
 test_begin_subtest "Searching when all three messages match"
-output=$($NOTMUCH search findme | notmuch_search_sanitize)
+output=$(notmuch search findme | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [3/3] User, User1, User2; author-reorder-threadtest (inbox unread)"
 
 test_begin_subtest "Searching when two messages match"
-output=$($NOTMUCH search User1 or User2 | notmuch_search_sanitize)
+output=$(notmuch search User1 or User2 | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [2/3] User1, User2| User; author-reorder-threadtest (inbox unread)"
 
 test_begin_subtest "Searching when only one message matches"
-output=$($NOTMUCH search User2 | notmuch_search_sanitize)
+output=$(notmuch search User2 | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [1/3] User2| User, User1; author-reorder-threadtest (inbox unread)"
 
 test_begin_subtest "Searching when only first message matches"
-output=$($NOTMUCH search User | notmuch_search_sanitize)
+output=$(notmuch search User | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [1/3] User| User1, User2; author-reorder-threadtest (inbox unread)"
 
 test_done
index 21f91055386f280e0c58545de5c04bb4c9f9c4bd..466f363d3c462380a53f45028bc21814a42c1ba2 100755 (executable)
@@ -4,19 +4,19 @@ test_description="\"notmuch dump\" and \"notmuch restore\""
 
 test_expect_success "Dumping all tags" "generate_message &&
 notmuch new &&
-$NOTMUCH dump dump.expected"
+notmuch dump dump.expected"
 
 test_begin_subtest "Clearing all tags"
 sed -e "s/(\([^(]*\))$/()/" < dump.expected > clear.expected
-$NOTMUCH restore clear.expected 
-$NOTMUCH dump clear.actual
+notmuch restore clear.expected
+notmuch dump clear.actual
 test_expect_equal "$(< clear.actual)" "$(< clear.expected)"
 
 test_begin_subtest "Restoring original tags"
-$NOTMUCH restore dump.expected
-$NOTMUCH dump dump.actual
+notmuch restore dump.expected
+notmuch dump dump.actual
 test_expect_equal "$(< dump.actual)" "$(< dump.expected)"
 
-test_expect_success "Restore with nothing to do" "$NOTMUCH restore dump.expected"
+test_expect_success "Restore with nothing to do" "notmuch restore dump.expected"
 
 test_done
index 6a7196be2d3afc32dbbb9b8e9ea622f7c31b8514..68cb8ee840d7b8f3ed8b4dc8b0c1bc951956b91d 100755 (executable)
@@ -5,7 +5,7 @@ test_description="encoding issues"
 test_begin_subtest "Message with text of unknown charset"
 add_message '[content-type]="text/plain; charset=unknown-8bit"' \
             "[body]=irrelevant"
-output=$($NOTMUCH show id:${gen_msg_id} 2>&1 | notmuch_show_sanitize)
+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{
 Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox unread)
index 613917c945a58f48f7b7681447ee2652fc654253..fab2007fdd2103fb5368a4685e79eef251128a40 100755 (executable)
@@ -9,7 +9,7 @@ add_message '[from]="Sender <sender@example.com>"' \
             '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
             '[body]="from guessing test"'
 
-output=$($NOTMUCH reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
 Subject: Re: notmuch-reply-test
 To: Sender <sender@example.com>, mailinglist@notmuchmail.org
@@ -28,7 +28,7 @@ add_message '[from]="Sender <sender@example.com>"' \
             '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
             '[body]="from guessing test"'
 
-output=$($NOTMUCH reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite_other@notmuchmail.org>
 Subject: Re: notmuch-reply-test
 To: Sender <sender@example.com>, mailinglist@notmuchmail.org
@@ -47,7 +47,7 @@ add_message '[from]="Sender <sender@example.com>"' \
             '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
             '[body]="from guessing test"'
 
-output=$($NOTMUCH reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite_other@notmuchmail.org>
 Subject: Re: notmuch-reply-test
 To: Sender <sender@example.com>, mailinglist@notmuchmail.org
@@ -68,7 +68,7 @@ add_message '[from]="Sender <sender@example.com>"' \
             '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
             '[body]="from guessing test"'
 
-output=$($NOTMUCH reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite_other@notmuchmail.org>
 Subject: Re: notmuch-reply-test
 To: Sender <sender@example.com>, mailinglist@notmuchmail.org
@@ -89,7 +89,7 @@ add_message '[from]="Sender <sender@example.com>"' \
             '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
             '[body]="from guessing test"'
 
-output=$($NOTMUCH reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@otherdomain.org>
 Subject: Re: notmuch-reply-test
 To: Sender <sender@example.com>, mailinglist@notmuchmail.org
@@ -111,7 +111,7 @@ add_message '[from]="Sender <sender@example.com>"' \
             '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
             '[body]="from guessing test"'
 
-output=$($NOTMUCH reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
 Subject: Re: notmuch-reply-test
 To: Sender <sender@example.com>, mailinglist@notmuchmail.org
@@ -130,7 +130,7 @@ add_message '[from]="Sender <sender@example.com>"' \
             '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
             '[body]="from guessing test"'
 
-output=$($NOTMUCH reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
 Subject: Re: notmuch-reply-test
 To: Sender <sender@example.com>, mailinglist@notmuchmail.org
@@ -149,7 +149,7 @@ add_message '[from]="Sender <sender@example.com>"' \
             '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
             '[body]="from guessing test"'
 
-output=$($NOTMUCH reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
 Subject: Re: notmuch-reply-test
 To: Sender <sender@example.com>, mailinglist@notmuchmail.org
@@ -170,7 +170,7 @@ add_message '[from]="Sender <sender@example.com>"' \
             '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
             '[body]="from guessing test"'
 
-output=$($NOTMUCH reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
 Subject: Re: notmuch-reply-test
 To: Sender <sender@example.com>, mailinglist@notmuchmail.org
@@ -191,7 +191,7 @@ add_message '[from]="Sender <sender@example.com>"' \
             '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
             '[body]="from guessing test"'
 
-output=$($NOTMUCH reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
 Subject: Re: notmuch-reply-test
 To: Sender <sender@example.com>, mailinglist@notmuchmail.org
index 2497613188469de16db82853a7e53c365d5a3962..7fe2a27a8d6479bfd32c0d03b1c68b23ff7bf26f 100755 (executable)
--- a/test/json
+++ b/test/json
@@ -4,12 +4,12 @@ test_description="--format=json output"
 
 test_begin_subtest "Show message: json"
 add_message "[subject]=\"json-show-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"json-show-message\""
-output=$($NOTMUCH show --format=json "json-show-message")
+output=$(notmuch show --format=json "json-show-message")
 test_expect_equal "$output" "[[[{\"id\": \"${gen_msg_id}\", \"match\": true, \"filename\": \"${gen_msg_filename}\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\",\"unread\"], \"headers\": {\"Subject\": \"json-show-subject\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"Cc\": \"\", \"Bcc\": \"\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 -0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"text/plain\", \"content\": \"json-show-message\n\"}]}, []]]]"
 
 test_begin_subtest "Search message: json"
 add_message "[subject]=\"json-search-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"json-search-message\""
-output=$($NOTMUCH search --format=json "json-search-message" | notmuch_search_sanitize)
+output=$(notmuch search --format=json "json-search-message" | notmuch_search_sanitize)
 test_expect_equal "$output" "[{\"thread\": \"XXX\",
 \"timestamp\": 946728000,
 \"matched\": 1,
@@ -20,17 +20,17 @@ test_expect_equal "$output" "[{\"thread\": \"XXX\",
 
 test_begin_subtest "Search by subject (utf-8):"
 add_message [subject]=utf8-sübjéct "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\""
-output=$($NOTMUCH search subject:utf8-sübjéct | notmuch_search_sanitize)
+output=$(notmuch search subject:utf8-sübjéct | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; utf8-sübjéct (inbox unread)"
 
 test_begin_subtest "Show message: json, utf-8"
 add_message "[subject]=\"json-show-utf8-body-sübjéct\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"jsön-show-méssage\""
-output=$($NOTMUCH show --format=json "jsön-show-méssage")
+output=$(notmuch show --format=json "jsön-show-méssage")
 test_expect_equal "$output" "[[[{\"id\": \"${gen_msg_id}\", \"match\": true, \"filename\": \"${gen_msg_filename}\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\",\"unread\"], \"headers\": {\"Subject\": \"json-show-utf8-body-sübjéct\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"Cc\": \"\", \"Bcc\": \"\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 -0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"text/plain\", \"content\": \"jsön-show-méssage\n\"}]}, []]]]"
 
 test_begin_subtest "Search message: json, utf-8"
 add_message "[subject]=\"json-search-utf8-body-sübjéct\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"jsön-search-méssage\""
-output=$($NOTMUCH search --format=json "jsön-search-méssage" | notmuch_search_sanitize)
+output=$(notmuch search --format=json "jsön-search-méssage" | notmuch_search_sanitize)
 test_expect_equal "$output" "[{\"thread\": \"XXX\",
 \"timestamp\": 946728000,
 \"matched\": 1,
index 202a03219cf4036786dd1a9d87ce15db97996fcf..84f92943595a6a20a52587a25a0b863178710582 100755 (executable)
@@ -21,7 +21,7 @@ output=$(NOTMUCH_NEW)
 test_expect_equal "$output" "Added 1 new message to the database."
 
 test_begin_subtest "Ensure all messages were threaded together"
-output=$($NOTMUCH search 'subject:"a ridiculously-long message ID"' | notmuch_search_sanitize)
+output=$(notmuch search 'subject:"a ridiculously-long message ID"' | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2001-01-05 [1/3] Notmuch Test Suite; A ridiculously-long message ID (inbox unread)"
 
 test_done
index 4c6952fd6d31c6834bd7431ecf4561df5fe05e78..7b396ae4eae2c72ef582b03a318cca2c85cc4484 100755 (executable)
--- a/test/new
+++ b/test/new
@@ -53,7 +53,7 @@ tmp_msg_filename=tmp/"$gen_msg_filename"
 mkdir -p "$(dirname "$tmp_msg_filename")"
 mv "$gen_msg_filename" "$tmp_msg_filename"
 increment_mtime "${MAIL_DIR}"
-$NOTMUCH new > /dev/null
+notmuch new > /dev/null
 mv "$tmp_msg_filename" "$gen_msg_filename"
 increment_mtime "${MAIL_DIR}"
 output=$(NOTMUCH_NEW)
@@ -63,7 +63,7 @@ test_expect_equal "$output" "Added 1 new message to the database."
 test_begin_subtest "Renamed message"
 
 generate_message
-$NOTMUCH new > /dev/null
+notmuch new > /dev/null
 mv "$gen_msg_filename" "${gen_msg_filename}"-renamed
 increment_mtime "${MAIL_DIR}"
 output=$(NOTMUCH_NEW)
@@ -84,7 +84,7 @@ generate_message [dir]=dir
 generate_message [dir]=dir
 generate_message [dir]=dir
 
-$NOTMUCH new > /dev/null
+notmuch new > /dev/null
 
 mv "${MAIL_DIR}"/dir "${MAIL_DIR}"/dir-renamed
 increment_mtime "${MAIL_DIR}"
index d6b7431740a503f9b8167a68ef522d0d9a5fc42d..9f6442b7b8a38fc754fbb1067ac8e1f7e65e2167 100755 (executable)
@@ -9,7 +9,7 @@ add_message '[from]="Sender <sender@example.com>"' \
             '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
             '[body]="basic reply test"'
 
-output=$($NOTMUCH reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
 Subject: Re: notmuch-reply-test
 To: Sender <sender@example.com>
@@ -27,7 +27,7 @@ add_message '[from]="Sender <sender@example.com>"' \
             '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
             '[body]="Multiple recipients"'
 
-output=$($NOTMUCH reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
 Subject: Re: notmuch-reply-test
 To: Sender <sender@example.com>, Someone Else <someone@example.com>
@@ -46,7 +46,7 @@ add_message '[from]="Sender <sender@example.com>"' \
             '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
             '[body]="reply with CC"'
 
-output=$($NOTMUCH reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
 Subject: Re: notmuch-reply-test
 To: Sender <sender@example.com>
@@ -65,7 +65,7 @@ add_message '[from]="Sender <sender@example.com>"' \
             '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \
             '[body]="reply from alternate address"'
 
-output=$($NOTMUCH reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite_other@notmuchmail.org>
 Subject: Re: notmuch-reply-test
 To: Sender <sender@example.com>
@@ -84,7 +84,7 @@ add_message '[from]="Sender <sender@example.com>"' \
             '[body]="support for reply-to"' \
             '[reply-to]="Sender <elsewhere@example.com>"'
 
-output=$($NOTMUCH reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
 Subject: Re: notmuch-reply-test
 To: Sender <elsewhere@example.com>
@@ -103,7 +103,7 @@ add_message '[from]="Sender <sender@example.com>"' \
             '[body]="Un-munging Reply-To"' \
             '[reply-to]="Evil Munging List <list@example.com>"'
 
-output=$($NOTMUCH reply id:${gen_msg_id})
+output=$(notmuch reply id:${gen_msg_id})
 test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
 Subject: Re: notmuch-reply-test
 To: Sender <sender@example.com>, Some List <list@example.com>
@@ -118,7 +118,7 @@ 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"'
-output=$($NOTMUCH reply id:${gen_msg_id})
+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
 Bcc: test_suite@notmuchmail.org
index 865f5bb6b996d21b3d0aaaeb2b196a1ea8b1d2b2..32799c40eb9737a89d0798a7b898e97dd024bc97 100755 (executable)
@@ -4,75 +4,75 @@ test_description='"notmuch search" in several variations'
 
 test_begin_subtest "Search body"
 add_message '[subject]="body search"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' [body]=bodysearchtest
-output=$($NOTMUCH search bodysearchtest | notmuch_search_sanitize)
+output=$(notmuch search bodysearchtest | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; body search (inbox unread)"
 
 test_begin_subtest "Search by from:"
 add_message '[subject]="search by from"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' [from]=searchbyfrom
-output=$($NOTMUCH search from:searchbyfrom | notmuch_search_sanitize)
+output=$(notmuch search from:searchbyfrom | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [1/1] searchbyfrom; search by from (inbox unread)"
 
 test_begin_subtest "Search by to:"
 add_message '[subject]="search by to"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' [to]=searchbyto
-output=$($NOTMUCH search to:searchbyto | notmuch_search_sanitize)
+output=$(notmuch search to:searchbyto | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; search by to (inbox unread)"
 
 test_begin_subtest "Search by subject:"
 add_message [subject]=subjectsearchtest '[date]="Sat, 01 Jan 2000 12:00:00 -0000"'
-output=$($NOTMUCH search subject:subjectsearchtest | notmuch_search_sanitize)
+output=$(notmuch search subject:subjectsearchtest | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; subjectsearchtest (inbox unread)"
 
 test_begin_subtest "Search by id:"
 add_message '[subject]="search by id"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"'
-output=$($NOTMUCH search id:${gen_msg_id} | notmuch_search_sanitize)
+output=$(notmuch search id:${gen_msg_id} | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; search by id (inbox unread)"
 
 test_begin_subtest "Search by tag:"
 add_message '[subject]="search by tag"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"'
-$NOTMUCH tag +searchbytag id:${gen_msg_id}
-output=$($NOTMUCH search tag:searchbytag | notmuch_search_sanitize)
+notmuch tag +searchbytag id:${gen_msg_id}
+output=$(notmuch search tag:searchbytag | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; search by tag (inbox searchbytag unread)"
 
 test_begin_subtest "Search by thread:"
 add_message '[subject]="search by thread"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"'
-thread_id=$($NOTMUCH search id:${gen_msg_id} | sed -e "s/thread:\([a-f0-9]*\).*/\1/")
-output=$($NOTMUCH search thread:${thread_id} | notmuch_search_sanitize)
+thread_id=$(notmuch search id:${gen_msg_id} | sed -e "s/thread:\([a-f0-9]*\).*/\1/")
+output=$(notmuch search thread:${thread_id} | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; search by thread (inbox unread)"
 
 test_begin_subtest "Search body (phrase)"
 add_message '[subject]="body search (phrase)"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' '[body]="body search (phrase)"'
 add_message '[subject]="negative result"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' '[body]="This phrase should not match the body search"'
-output=$($NOTMUCH search '"body search (phrase)"' | notmuch_search_sanitize)
+output=$(notmuch search '"body search (phrase)"' | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; body search (phrase) (inbox unread)"
 
 test_begin_subtest "Search by from: (address)"
 add_message '[subject]="search by from (address)"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' [from]=searchbyfrom@example.com
-output=$($NOTMUCH search from:searchbyfrom@example.com | notmuch_search_sanitize)
+output=$(notmuch search from:searchbyfrom@example.com | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [1/1] searchbyfrom@example.com; search by from (address) (inbox unread)"
 
 test_begin_subtest "Search by from: (name)"
 add_message '[subject]="search by from (name)"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' '[from]="Search By From Name <test@example.com>"'
-output=$($NOTMUCH search from:"Search By From Name" | notmuch_search_sanitize)
+output=$(notmuch search from:"Search By From Name" | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [1/1] Search By From Name; search by from (name) (inbox unread)"
 
 test_begin_subtest "Search by to: (address)"
 add_message '[subject]="search by to (address)"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' [to]=searchbyto@example.com
-output=$($NOTMUCH search to:searchbyto@example.com | notmuch_search_sanitize)
+output=$(notmuch search to:searchbyto@example.com | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; search by to (address) (inbox unread)"
 
 test_begin_subtest "Search by to: (name)"
 add_message '[subject]="search by to (name)"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' '[to]="Search By To Name <test@example.com>"'
-output=$($NOTMUCH search to:"Search By To Name" | notmuch_search_sanitize)
+output=$(notmuch search to:"Search By To Name" | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; search by to (name) (inbox unread)"
 
 test_begin_subtest "Search by subject: (phrase)"
 add_message '[subject]="subject search test (phrase)"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"'
 add_message '[subject]="this phrase should not match the subject search test"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"'
-output=$($NOTMUCH search 'subject:"subject search test (phrase)"' | notmuch_search_sanitize)
+output=$(notmuch search 'subject:"subject search test (phrase)"' | notmuch_search_sanitize)
 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)
+output=$(notmuch search '*' | notmuch_search_sanitize)
 test_expect_equal):' "$output" "thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; body search (inbox unread)
 thread:XXX   2000-01-01 [1/1] searchbyfrom; search by from (inbox unread)
 thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; search by to (inbox unread)
@@ -91,7 +91,7 @@ thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; this phrase should not match t
 
 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ý"'
-output=$($NOTMUCH search "bödý" | notmuch_search_sanitize)
+output=$(notmuch search "bödý" | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; utf8-message-body-subject (inbox unread)"
 
 test_done
index 7a4931d2229d91306d5d7e696aeb77d99af3ec70..559a5435985f60dfb3b86257a5a8c622b74603e6 100644 (file)
@@ -396,8 +396,6 @@ test_expect_equal ()
     fi
 }
 
-NOTMUCH=notmuch
-
 NOTMUCH_NEW ()
 {
     notmuch new | grep -v -E -e '^Processed [0-9]*( total)? file|Found [0-9]* total file'
index 31c0153255ca95bad21f09ef0b3c77c6790376b8..129536e0927acf60795e81de835b12cedfc37f94 100755 (executable)
@@ -19,54 +19,54 @@ add_message '[subject]="thread-naming: Final thread subject"' \
 final=${gen_msg_id}
 
 test_begin_subtest "Initial thread name (oldest-first search)"
-output=$($NOTMUCH search --sort=oldest-first thread-naming and tag:inbox | notmuch_search_sanitize)
+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)"
 
 test_begin_subtest "Initial thread name (newest-first search)"
-output=$($NOTMUCH search --sort=newest-first thread-naming and tag:inbox | notmuch_search_sanitize)
+output=$(notmuch search --sort=newest-first thread-naming and tag:inbox | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2001-01-08 [4/4] Notmuch Test Suite; thread-naming: Final thread subject (inbox unread)"
 
 # Remove oldest and newest messages from search results
-$NOTMUCH tag -inbox id:$parent or id:$final
+notmuch tag -inbox id:$parent or id:$final
 
 test_begin_subtest "Changed thread name (oldest-first search)"
-output=$($NOTMUCH search --sort=oldest-first thread-naming and tag:inbox | notmuch_search_sanitize)
+output=$(notmuch search --sort=oldest-first thread-naming and tag:inbox | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2001-01-06 [2/4] Notmuch Test Suite; thread-naming: Older changed subject (inbox unread)"
 
 test_begin_subtest "Changed thread name (newest-first search)"
-output=$($NOTMUCH search --sort=newest-first thread-naming and tag:inbox | notmuch_search_sanitize)
+output=$(notmuch search --sort=newest-first thread-naming and tag:inbox | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2001-01-07 [2/4] Notmuch Test Suite; thread-naming: Newer changed subject (inbox unread)"
 
 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\>"
-output=$($NOTMUCH search --sort=newest-first thread-naming and tag:inbox | notmuch_search_sanitize)
+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\>"
-output=$($NOTMUCH search --sort=newest-first thread-naming and tag:inbox | notmuch_search_sanitize)
+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\>"
-output=$($NOTMUCH search --sort=newest-first thread-naming and tag:inbox | notmuch_search_sanitize)
+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\>"
-output=$($NOTMUCH search --sort=newest-first thread-naming and tag:inbox | notmuch_search_sanitize)
+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)"
 
 test_begin_subtest 'Test order of messages in "notmuch show"'
-output=$($NOTMUCH show thread-naming | notmuch_show_sanitize)
+output=$(notmuch show thread-naming | notmuch_show_sanitize)
 test_expect_equal "$output" "\fmessage{ id:msg-$(printf "%03d" $first)@notmuch-test-suite depth:0 match:1 filename:/XXX/mail/msg-$(printf "%03d" $first)
 \fheader{
 Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (unread)
index 47f25c86df326845a9be04d8cd218901a92dc92c..1819fce32f8260cbef5e1618c6e85d802bb2017a 100755 (executable)
@@ -8,7 +8,7 @@ output=$(NOTMUCH_NEW)
 test_expect_equal "$output" "Added 1 new message to the database."
 
 test_begin_subtest "Searching returns the message"
-output=$($NOTMUCH search foo | notmuch_search_sanitize)
+output=$(notmuch search foo | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; brokenthreadtest (inbox unread)"
 
 test_begin_subtest "Adding second child message"
@@ -17,7 +17,7 @@ output=$(NOTMUCH_NEW)
 test_expect_equal "$output" "Added 1 new message to the database."
 
 test_begin_subtest "Searching returns both messages in one thread"
-output=$($NOTMUCH search foo | notmuch_search_sanitize)
+output=$(notmuch search foo | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [2/2] Notmuch Test Suite; brokenthreadtest (inbox unread)"
 
 test_begin_subtest "Adding parent message"
@@ -26,7 +26,7 @@ output=$(NOTMUCH_NEW)
 test_expect_equal "$output" "Added 1 new message to the database."
 
 test_begin_subtest "Searching returns all three messages in one thread"
-output=$($NOTMUCH search foo | notmuch_search_sanitize)
+output=$(notmuch search foo | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [3/3] Notmuch Test Suite; brokenthreadtest (inbox unread)"
 
 test_done
index 3592d5cc13f895e34ac3c923c616ba0d62a583c1..d5093209056f732f8f15b774055ff9efea5ad733 100755 (executable)
@@ -20,15 +20,15 @@ end
 Finally, we have our afteruudata marker as well."'
 
 test_begin_subtest "Ensure content before uu data is indexed"
-output=$($NOTMUCH search beforeuudata | notmuch_search_sanitize)
+output=$(notmuch search beforeuudata | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; uuencodetest (inbox unread)"
 
 test_begin_subtest "Ensure uu data is not indexed"
-output=$($NOTMUCH search DURINGUUDATA | notmuch_search_sanitize)
+output=$(notmuch search DURINGUUDATA | notmuch_search_sanitize)
 test_expect_equal "$output" ""
 
 test_begin_subtest "Ensure content after uu data is indexed"
-output=$($NOTMUCH search afteruudata | notmuch_search_sanitize)
+output=$(notmuch search afteruudata | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; uuencodetest (inbox unread)"
 
 test_done