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) {
60 out.
cat(result.we_wordv[0]);
61 for (
unsigned int i = 1; i < result.we_wordc; i++) {
63 out.
cat(result.we_wordv[i]);
81 void TEST_arb_shell_expand() {
GB_ERROR GB_incur_error()
char * ARB_strdup(const char *str)
void cat(const char *from)
#define TEST_PUBLISH(testfunction)
#define TEST_EXPECT_CONTAINS(str, part)
char * arb_shell_expand(const char *str)
#define TEST_REJECT(cond)
static void error(const char *msg)
GB_ERROR GB_export_errorf(const char *templat,...)
#define TEST_EXPECT_EQUAL(expr, want)