]> git.notmuchmail.org Git - notmuch/blobdiff - test/T140-excludes.sh
lib/database: delete stemmer on destroy
[notmuch] / test / T140-excludes.sh
index 0cacc41d9d573f6f98abfc43df18e819a2c7eff2..e9cc9cb078d73352539973937ac44eee65b34ac6 100755 (executable)
@@ -5,8 +5,7 @@ test_description='"notmuch search, count and show" with excludes in several vari
 # Generates a thread consisting of a top level message and 'length'
 # replies. The subject of the top message 'subject: top message"
 # and the subject of the nth reply in the thread is "subject: reply n"
-generate_thread ()
-{
+generate_thread () {
     local subject="$1"
     local length="$2"
     generate_message '[subject]="'"${subject}: top message"'"' '[body]="'"body of top message"'"'
@@ -22,7 +21,7 @@ generate_thread ()
     done
     notmuch new > /dev/null
     # We cannot retrieve the thread_id until after we have run notmuch new.
-    gen_thread_id=`notmuch search --output=threads id:${gen_thread_msg_id[0]}`
+    gen_thread_id=$(notmuch search --output=threads id:${gen_thread_msg_id[0]} 2>/dev/null)
 }
 
 #############################################
@@ -389,7 +388,7 @@ Subject: No messages excluded: single match: reply 4
 Subject: No messages excluded: single match: reply 5"
 
 test_begin_subtest "Show, exclude=false"
-output=$(notmuch show --exclude=false tag:test | notmuch_show_sanitize_all  | egrep "Subject:|message{")
+output=$(notmuch show --exclude=false tag:test | notmuch_show_sanitize_all | egrep "Subject:|message{")
 test_expect_equal "$output" "\fmessage{ id:XXXXX depth:0 match:1 excluded:1 filename:XXXXX
 Subject: All messages excluded: single match: reply 2
 \fmessage{ id:XXXXX depth:0 match:1 excluded:1 filename:XXXXX