unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
blob 25decc9bf9307081454ccc7e8dbf386772446d3a 533 bytes (raw)
name: test/message-id-parse.c 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 
#include <stdio.h>
#include <talloc.h>
#include "notmuch-private.h"

int main(unused (int argc), unused (char **argv)){
    char *line = NULL;
    size_t len = 0;
    ssize_t nread;
    void *local = talloc_new (NULL);

    while ((nread = getline(&line, &len, stdin)) != -1) {
	int last = strlen(line) - 1;
	if (line[last] == '\n')
	    line[last] = '\0';

	char *mid = _notmuch_message_id_parse_strict (local, line);
	if (mid)
	    printf("GOOD: %s\n", mid);
	else
	    printf("BAD: %s\n", line);
    }

    talloc_free (local);
}

debug log:

solving 25decc9b ...
found 25decc9b in https://yhetil.org/notmuch/20180730224555.26047-14-david@tethera.net/ ||
	https://yhetil.org/notmuch/20180723082259.32440-5-david@tethera.net/ ||
	https://yhetil.org/notmuch/20180801045823.7802-1-david@tethera.net/

applying [1/1] https://yhetil.org/notmuch/20180730224555.26047-14-david@tethera.net/
diff --git a/test/message-id-parse.c b/test/message-id-parse.c
new file mode 100644
index 00000000..25decc9b

Checking patch test/message-id-parse.c...
Applied patch test/message-id-parse.c cleanly.

skipping https://yhetil.org/notmuch/20180723082259.32440-5-david@tethera.net/ for 25decc9b
skipping https://yhetil.org/notmuch/20180801045823.7802-1-david@tethera.net/ for 25decc9b
index at:
100644 25decc9bf9307081454ccc7e8dbf386772446d3a	test/message-id-parse.c

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).