unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
blob 94348d69d8c819b3c35a98a17a3a7329a1962117 788 bytes (raw)
name: test/notmuch-test.h 	 # 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
 
#ifndef _NOTMUCH_TEST_H
#define _NOTMUCH_TEST_H
#include <stdio.h>
#include <stdlib.h>
#include <notmuch.h>
#include <dlfcn.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>

inline static void
expect0 (int line, notmuch_status_t ret)
{
    if (ret) {
	fprintf (stderr, "line %d: %d\n", line, ret);
	exit (1);
    }
}

#define EXPECT0(v)  expect0 (__LINE__, v);

#define TEST_SAVE_ORIG(func) \
  if (! orig_##func) { \
    void *handle; \
    char *error; \
    handle = dlopen("libnotmuch.so", RTLD_LAZY); \
    if (! handle) { \
      fputs(dlerror(), stderr); \
      exit(1); \
    } \
    orig_##func = dlsym(handle, #func); \
    if ((error = dlerror()) != NULL) { \
      fprintf(stderr, "%s\n", error); \
      exit(1); \
    } \
  }


#endif

debug log:

solving 94348d69 ...
found 94348d69 in https://yhetil.org/notmuch/20211025011515.2533779-3-david@tethera.net/
found 8613a299 in https://yhetil.org/notmuch/20211025011515.2533779-2-david@tethera.net/
found 34dbb8e0 in https://yhetil.org/notmuch.git/
preparing index
index prepared:
100644 34dbb8e0403feefc4be402178943d8576a8d9c01	test/notmuch-test.h

applying [1/2] https://yhetil.org/notmuch/20211025011515.2533779-2-david@tethera.net/
diff --git a/test/notmuch-test.h b/test/notmuch-test.h
index 34dbb8e0..8613a299 100644


applying [2/2] https://yhetil.org/notmuch/20211025011515.2533779-3-david@tethera.net/
diff --git a/test/notmuch-test.h b/test/notmuch-test.h
index 8613a299..94348d69 100644

Checking patch test/notmuch-test.h...
Applied patch test/notmuch-test.h cleanly.
Checking patch test/notmuch-test.h...
Applied patch test/notmuch-test.h cleanly.

index at:
100644 94348d69d8c819b3c35a98a17a3a7329a1962117	test/notmuch-test.h

(*) 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).