diff options
| author | David Bremner <david@tethera.net> | 2021-02-18 08:47:53 -0400 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2021-02-18 08:47:53 -0400 |
| commit | 4c79a2dabe38ac72eb9eb21620f2ffca5f1885c6 (patch) | |
| tree | e2b2ecd4641a8e77e216133d12a32a89c307a498 /test | |
| parent | 7061e41cd0ed7a37dab83687697a692a53c5a66f (diff) | |
| parent | 3a3208bb7b8bfca1c0bcaa5b45b6ef71aa768612 (diff) | |
Merge tag '0.31.4'
notmuch 0.31.4 release
Diffstat (limited to 'test')
| -rwxr-xr-x | test/T568-lib-thread.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/T568-lib-thread.sh b/test/T568-lib-thread.sh index ac13d986..088e66dd 100755 --- a/test/T568-lib-thread.sh +++ b/test/T568-lib-thread.sh @@ -8,6 +8,11 @@ add_email_corpus test_begin_subtest "building database" test_expect_success "NOTMUCH_NEW" +test_begin_subtest "finding thread" +THREAD=$(notmuch search --output=threads id:20091117190054.GU3165@dottiness.seas.harvard.edu) +count=$(notmuch count $THREAD) +test_expect_equal "$count" "7" + cat <<'EOF' > c_tail if (stat) { const char *stat_str = notmuch_database_status_string (db); @@ -30,7 +35,7 @@ int main (int argc, char** argv) notmuch_thread_t *thread = NULL; notmuch_threads_t *threads = NULL; notmuch_query_t *query = NULL; - const char *id = "thread:0000000000000009"; + const char *id = "${THREAD}"; stat = notmuch_database_open_verbose (argv[1], NOTMUCH_DATABASE_MODE_READ_WRITE, &db, &msg); if (stat != NOTMUCH_STATUS_SUCCESS) { @@ -52,10 +57,11 @@ cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} printf("%d\n%s\n", thread != NULL, id2); } EOF +thread_num=${THREAD#thread:} cat <<EOF > EXPECTED == stdout == 1 -0000000000000009 +${thread_num} == stderr == EOF test_expect_equal_file EXPECTED OUTPUT |
