summaryrefslogtreecommitdiff
path: root/test/symbol-test.cc
blob: f17ddc854c720eb79749f8c4d5428fc5a13ce19b (plain)
#include <stdio.h>
#include <stdlib.h>
#include <xapian.h>
#include <notmuch.h>


int main() {
  notmuch_database_t *notmuch;
  char *message = NULL;

  if (notmuch_database_open_verbose  ("fakedb", NOTMUCH_DATABASE_MODE_READ_ONLY, &notmuch, &message))
      if (message) {
	  fputs (message, stderr);
	  free (message);
      }

  try {
    (void) new Xapian::WritableDatabase("./nonexistent", Xapian::DB_OPEN);
  } catch (const Xapian::Error &error) {
    printf("caught %s\n", error.get_msg().c_str());
    return 0;
  }

  return 1;
}