blob: d116382491a126afbff139f66ff737a88e3b9a02 (
plain)
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
|
#ifndef TEST_ARGS_H
#define TEST_ARGS_H
#include <config.h>
#include <test/test-lib.h>
#include <test/lib-test-args.h>
#define CONFIG_CLEAR_ARGS(sh) \
do { \
config_clear(sh); \
sh->args_enabled = 1; \
sh->hide_tid = 1; \
} while(0)
#define LOCAL_TEST(data, cnt, test) \
do { \
char buf[BUFSIZE]; \
int ret; \
TEST_START(); \
test; \
TEST_STOP(); \
ret = fout_read(sh, buf, BUFSIZE); \
if (!ret) \
return -1; \
ret = re_test(buf, data, cnt); \
if (RE_TEST_OK != ret) \
FAILED("test %i, pattern '%s'\n", ret, data[ret].pat); \
} while(0)
#endif /* TEST_ARGS_H */
|