1 /* Test for bug BZ #2703. */
25 #define nstrs (sizeof (strs) / sizeof (strs[0]))
33 char *str = malloc (100);
36 puts ("out of memory");
42 for (int i = 0; i < nstrs; ++i)
43 argz_add_sep (argz, &size, strs[i].s, '\0');
45 printf ("calling envz_strip with size=%zu\n", size);
46 envz_strip (argz, &size);
49 printf ("new size=%zu\n", size);
50 for (int i = 0; i < nstrs; ++i)
51 if (strs[i].in_result)
54 name[0] = strs[i].s[0];
57 char *e = envz_entry (*argz, size, name);
60 printf ("entry '%s' not found\n", name);
63 else if (strcmp (e, strs[i].s) != 0)
65 printf ("entry '%s' does not match: is '%s', expected '%s'\n",
75 #include <support/test-driver.c>