23 char *expanded =
NULp;
27 switch (wordexp(str, &result, 0)) {
31 error =
"Illegal character";
34 error =
"Undefined variable referenced";
37 error =
"Command substitution not allowed";
40 error =
"Out of memory";
43 error =
"Syntax error";
46 error =
"Unknown error";
55 if (result.we_wordc == 0) {
61 for (
unsigned int i = 1; i < result.we_wordc; i++) {
81 void TEST_arb_shell_expand() {
GB_ERROR GB_incur_error()
char * ARB_strdup(const char *str)
#define TEST_PUBLISH(testfunction)
#define TEST_EXPECT_CONTAINS(str, part)
GBS_strstruct * GBS_stropen(long init_size)
char * arb_shell_expand(const char *str)
#define TEST_REJECT(cond)
void GBS_strcat(GBS_strstruct *strstr, const char *ptr)
static void error(const char *msg)
void GBS_chrcat(GBS_strstruct *strstr, char ch)
GB_ERROR GB_export_errorf(const char *templat,...)
char * GBS_strclose(GBS_strstruct *strstr)
#define TEST_EXPECT_EQUAL(expr, want)