2 test_description="library config API"
4 . ./test-lib.sh || exit 1
14 void run(int line, notmuch_status_t ret)
17 fprintf (stderr, "line %d: %s\n", line, ret);
22 #define RUN(v) run(__LINE__, v);
24 int main (int argc, char** argv)
26 notmuch_database_t *db;
28 notmuch_status_t stat;
30 RUN(notmuch_database_open (argv[1], NOTMUCH_DATABASE_MODE_READ_WRITE, &db));
35 RUN(notmuch_database_destroy(db));
39 test_begin_subtest "notmuch_database_{set,get}_config"
40 cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
42 RUN(notmuch_database_set_config (db, "testkey1", "testvalue1"));
43 RUN(notmuch_database_set_config (db, "testkey2", "testvalue2"));
44 RUN(notmuch_database_get_config (db, "testkey1", &val));
45 printf("testkey1 = %s\n", val);
46 RUN(notmuch_database_get_config (db, "testkey2", &val));
47 printf("testkey2 = %s\n", val);
56 test_expect_equal_file EXPECTED OUTPUT