3 #ifndef EL__UTIL_TEST_H
4 #define EL__UTIL_TEST_H
9 #if (__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || __GNUC__ > 2
10 __attribute__((noreturn
))
12 die(const char *msg
, ...)
18 vfprintf(stderr
, msg
, args
);
27 get_test_opt(char **argref
, const char *name
, int *argi
, int argc
, char *argv
[],
28 const char *expect_msg
)
31 int namelen
= strlen(name
);
33 if (strncmp(arg
, name
, namelen
))
43 die("--%s expects %s", name
, expect_msg
);
44 (*argref
) = argv
[(*argi
)];