notmuch search --output=messages from:/carl/ or from:/cworth/ > OUTPUT
test_expect_equal_file cworth.msg-ids OUTPUT
test_begin_subtest "non-empty regexp and query"
notmuch search from:/cworth@cworth.org/ and subject:patch | notmuch_search_sanitize > OUTPUT
cat <<EOF > EXPECTED
thread:XXX 2009-11-18 [1/2] Carl Worth| Alex Botero-Lowry;[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 [1/2] Carl Worth| Ingmar Vanhassel;[notmuch][PATCH] Typsos (inbox unread)
thread:XXX 2009-11-18 [1/2] Carl Worth| Jan Janak;[notmuch][PATCH] Older versions of install do not support -C. (inbox unread)
thread:XXX 2009-11-18 [1/2] Carl Worth| Keith Packard;[notmuch][PATCH] Make notmuch-show 'X'(and 'x') commands remove inbox (and unread) tags (inbox unread)
thread:XXX 2009-11-18 [2/5] Carl Worth| Mikhail Gusarov, Keith Packard;[notmuch][PATCH 1/2] Close message file after parsing message headers (inbox unread)
EOF
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "regexp from search, duplicate term search"