]> git.notmuchmail.org Git - notmuch/blob - test/symbol-test.cc
test: fix whitespace/indentation in symbol-test
[notmuch] / test / symbol-test.cc
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <xapian.h>
4 #include <notmuch.h>
5
6 int main (int argc, char** argv)
7 {
8     notmuch_database_t *notmuch;
9     char *message = NULL;
10
11     if (notmuch_database_open_verbose (argv[1], NOTMUCH_DATABASE_MODE_READ_ONLY,
12                                        &notmuch, &message)) {
13         if (message) {
14             fputs (message, stderr);
15             free (message);
16         }
17     }
18
19     try {
20         (void) new Xapian::WritableDatabase (argv[2], Xapian::DB_OPEN);
21     } catch (const Xapian::Error &error) {
22         printf("caught %s\n", error.get_msg().c_str());
23         return 0;
24     }
25
26     return 1;
27 }