-test_expect_success 'Message renamed due to changed flags can be shown without running notmuch new' '
-notmuch show --format=json id:msg-001@notmuch-test-suite | filter_show > show-actual &&
-test_cmp show-expected show-actual
-'
-
-test_expect_success 'Test that we can reply to the renamed message' '
-notmuch reply id:msg-001@notmuch-test-suite
-'
-
-echo "No new mail." > expected
-test_expect_success 'No rename should be detected by notmuch new' '
-increment_mtime "$(dirname "${gen_msg_filename}")" &&
-notmuch new > actual &&
-test_cmp expected actual
-'
-test_expect_success "Add a message to new/ without info" '
-generate_message [subject]="\"test message 3\"" [date]="\"Sat, 01 Jan 2000 12:00:00 -0000\"" [dir]=new &&
-NOTMUCH_NEW > actual &&
-test_cmp - actual <<EOF
-Added 1 new message to the database.
-EOF
-'
-test_expect_success "Check that the message has inbox and unread tags" '
-notmuch search tag:inbox and tag:unread | notmuch_search_sanitize > actual &&
-test_cmp - actual <<EOF
-thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; test message 3 (inbox unread)
-EOF
-'
-test_expect_success "Tag the message with 'tmp' tag" '
-notmuch tag +tmp tag:inbox and tag:unread'
-
-test_expect_success "Check that the message was not moved from new/ to cur/" '
-echo filename:$gen_msg_filename > expected &&
-notmuch show id:$gen_msg_id|grep -o "filename:.*$" > actual &&
-test_cmp expected actual &&
-test -f "$gen_msg_filename"
-'
-test_expect_success "Check that the message was not renamed" '
-ls "${MAIL_DIR}/new" > actual &&
-test_cmp - actual <<EOF
-msg-003
-EOF
-'
-test_expect_success 'Removing of unread tag should fail without cur/' '
-test_must_fail notmuch tag -unread tag:inbox and tag:unread
-'
-test_expect_success "Check that the tags were not changed" '
-notmuch search tag:inbox and tag:unread | notmuch_search_sanitize > actual &&
-test_cmp - actual <<EOF
-thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; test message 3 (inbox tmp unread)
-EOF
-'
-
-# notmuch new is not necessary here, but we run it in order to check
-# for 'no rename' later (*).
-test_expect_success 'Create cur/ and let notmuch know about it' '
-mkdir "$MAIL_DIR/cur" &&
-notmuch new
-'
-test_expect_success 'Removing of unread tag should pass with cur/' '
-notmuch tag -unread tag:inbox and tag:unread
-'
-test_expect_success 'Check that the message was moved to cur/' '\
-ls "$MAIL_DIR/cur" > actual &&
-test_cmp - actual <<EOF
-msg-003:2,S
-EOF
-'
-test_expect_success 'No rename should be detected by notmuch new' '
-increment_mtime "$MAIL_DIR/cur" &&
-notmuch new > actual &&
-test_cmp - actual <<EOF
-No new mail.
-EOF
-'
+test_expect_success 'notmuch reply works with renamed file (without notmuch new)' 'notmuch reply id:${gen_msg_id}'
+
+test_begin_subtest "notmuch new detects no file rename after tag->flag synchronization"
+increment_mtime "$(dirname ${gen_msg_filename})"
+output=$(NOTMUCH_NEW)
+test_expect_equal "$output" "No new mail."
+
+test_begin_subtest "When read, message moved from new to cur"
+add_message [subject]='"Message to move to cur"' [date]='"Sat, 01 Jan 2000 12:00:00 -0000"' [filename]='message-to-move-to-cur' [dir]=new
+notmuch tag -unread subject:"Message to move to cur"
+output=$(cd "$MAIL_DIR/cur"; ls message-to-move*)
+test_expect_equal "$output" "message-to-move-to-cur:2,S"
+
+test_begin_subtest "No rename should be detected by notmuch new"
+increment_mtime "$MAIL_DIR/cur"
+output=$(NOTMUCH_NEW)
+test_expect_equal "$output" "No new mail."