48 {
"/a/b/c/./../../g",
"/a/g" },
49 {
"mid/content=5/../6",
"mid/6" },
50 {
"/hello/../moo",
"/moo" },
56 {
"/1/./../2",
"/2" },
57 {
"/hello/1/./../2",
"/hello/2" },
58 {
"test/this",
"test/this" },
59 {
"test/this/../now",
"test/now" },
60 {
"/1../moo../foo",
"/1../moo../foo"},
61 {
"/../../moo",
"/moo"},
62 {
"/../../moo?andnot/../yay",
"/moo?andnot/../yay"},
63 {
"/123?foo=/./&bar=/../",
"/123?foo=/./&bar=/../"},
64 {
"/../moo/..?what",
"/?what" },
77 for(
i = 0;
i <
sizeof(
pairs)/
sizeof(pairs[0]);
i++) {
81 if(strcmp(out, pairs[
i].
output)) {
82 fprintf(stderr,
"Test %d: '%s' gave '%s' instead of '%s'\n",
83 i, pairs[
i].
input, out, pairs[
i].output);
84 fail(
"Test case output mismatched");
#define abort_unless(expr, msg)
static CURLcode unit_setup(void)
UNITTEST_START unsigned int i
const struct dotdot pairs[]
char * Curl_dedotdotify(const char *input)
fail_if(fails,"output mismatched")
static void unit_stop(void)