diff options
| author | Sam Varshavchik | 2022-02-03 23:38:02 -0500 |
|---|---|---|
| committer | Sam Varshavchik | 2022-02-03 23:38:02 -0500 |
| commit | 7ccf3c9341de9dc5319e7269793c4fcc7ece4eab (patch) | |
| tree | 6314785eb95176e4ceee3191347db7d9ba982da9 /maildir/maildirkwtest2.c | |
| parent | c02c7c70e57ce07f186862826168fae59df224cc (diff) | |
| download | courier-libs-7ccf3c9341de9dc5319e7269793c4fcc7ece4eab.tar.bz2 | |
Add additional tests.
Test keyword handling. Fix memory corruption in the maildirkw utilty.
Diffstat (limited to 'maildir/maildirkwtest2.c')
| -rw-r--r-- | maildir/maildirkwtest2.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/maildir/maildirkwtest2.c b/maildir/maildirkwtest2.c new file mode 100644 index 0000000..9a1dd7d --- /dev/null +++ b/maildir/maildirkwtest2.c @@ -0,0 +1,25 @@ +#define MAILDIRKW_MOCKTIME() \ + do { \ + const char *p=getenv("MOCKTIME"); \ + if (p) \ + t=atoi(p); \ + } while (0) + +#define MAILDIRKW_MOCKTIME2() \ + do { \ + const char *eee=getenv("MOCKTIME"); \ + \ + if (eee && strcmp(eee, "1000") == 0 && \ + strcmp(p, "004") == 0) \ + { \ + printf("Faked stale filename\n"); \ + fflush(stdout); \ + p=NULL; \ + \ + } \ + } while(0); \ + \ + i=NULL; \ + if (p) + +#include "maildirkeywords2.c" |
