]> git.cworth.org Git - notmuch/blobdiff - test/T566-lib-message.sh
test: split header for lib-message tests.
[notmuch] / test / T566-lib-message.sh
index 0c5575a98cbe372e8cb810341703d9c4bd7d28aa..3b0e85b546c516e368e1dacd9aae9964149e9b94 100755 (executable)
@@ -18,7 +18,7 @@ cat <<'EOF' > c_tail
 }
 EOF
 
-cat <<EOF > c_head
+cat <<EOF > c_head0
 #include <stdio.h>
 #include <notmuch.h>
 #include <notmuch-test.h>
@@ -36,9 +36,11 @@ int main (int argc, char** argv)
      exit (1);
    }
    EXPECT0(notmuch_database_find_message (db, id, &message));
-   EXPECT0(notmuch_database_close (db));
 EOF
 
+cp c_head0 c_head
+echo "   EXPECT0(notmuch_database_close (db));" >> c_head
+
 test_begin_subtest "Handle getting message-id from closed database"
 cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
     {
@@ -87,7 +89,6 @@ cat <<EOF > EXPECTED
 EOF
 test_expect_equal_file EXPECTED OUTPUT
 
-# XXX TODO: test on a message from notmuch_thread_get_toplevel_messages
 # XXX this test only tests the trivial code path
 test_begin_subtest "Handle getting replies from closed database"
 cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}