#include <afs/cmd.h>
#include <tests/tap/basic.h>
+#include "common.h"
enum cmdOptions {
copt_flag = 0,
list = list->next;
el = va_arg(ap, char *);
}
+ va_end(ap);
if (el == NULL && list == NULL) {
ok(1, "List has correct number of elements");
cmd_FreeArgv(tv);
/* Now, try adding a configuration file into the mix */
- if (getenv("SOURCE") == NULL)
- path = strdup("test1.conf");
- else
- asprintf(&path, "%s/cmd/test1.conf", getenv("SOURCE"));
-
+ path = afstest_src_path("tests/cmd/test1.conf");
cmd_SetCommandName("test");
code = cmd_OpenConfigFile(path);
is_int(0, code, "cmd_OpenConfigFile succeeds");