X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=test%2Frandom-corpus.c;h=d74271d932312d77ea66a02131a753ea4b931762;hp=f354d4b92c9f9e82d5cdccf6aa9360c3e729dc28;hb=b8f4e7da3d61733fb47111b162ccabb967a3661e;hpb=76fa93e2a2002940335c941e76e94d69abd71fe9 diff --git a/test/random-corpus.c b/test/random-corpus.c index f354d4b9..d74271d9 100644 --- a/test/random-corpus.c +++ b/test/random-corpus.c @@ -96,7 +96,9 @@ random_utf8_string (void *ctx, size_t char_count) buf = talloc_realloc (ctx, buf, gchar, buf_size); } - randomchar = random_unichar (); + do { + randomchar = random_unichar (); + } while (randomchar == '\n'); written = g_unichar_to_utf8 (randomchar, buf + offset); @@ -112,6 +114,25 @@ random_utf8_string (void *ctx, size_t char_count) return buf; } +/* stubs since we cannot link with notmuch.o */ +const notmuch_opt_desc_t notmuch_shared_options[] = { + { 0, 0, 0, 0, 0 } +}; + +char *notmuch_requested_db_uuid = NULL; + +void +notmuch_process_shared_options (unused (const char *dummy)) +{ +} + +int +notmuch_minimal_options (unused (const char *subcommand), + unused (int argc), + unused (char **argv)) +{ + return 0; +} int main (int argc, char **argv) @@ -158,7 +179,7 @@ main (int argc, char **argv) exit (1); } - config = notmuch_config_open (ctx, config_path, NULL); + config = notmuch_config_open (ctx, config_path, FALSE); if (config == NULL) return 1;