]> git.notmuchmail.org Git - notmuch/blobdiff - test/T140-excludes.sh
test: use correct fqdn in passwd_sanitize()
[notmuch] / test / T140-excludes.sh
index cef07095caf329910c7c997ece5f50b640b06177..acab5381b94334bed54f1453eaf61a1e54807eba 100755 (executable)
@@ -286,6 +286,21 @@ test_begin_subtest "Count, default exclusion: tag in query (threads)"
 output=$(notmuch count --output=threads tag:test and tag:deleted)
 test_expect_equal "$output" "3"
 
+test_begin_subtest "Count, default exclusion, batch"
+notmuch count  --batch --output=messages<<EOF > OUTPUT
+tag:test
+tag:test and tag:deleted
+tag:test
+tag:test and tag:deleted
+EOF
+cat <<EOF >EXPECTED
+2
+4
+2
+4
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
 test_begin_subtest "Count, exclude=true: tag in query (messages)"
 output=$(notmuch count --exclude=true tag:test and tag:deleted)
 test_expect_equal "$output" "4"
@@ -374,7 +389,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