* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
UNITTEST_START
unsigned int i;
- int fails=0;
+ int fails = 0;
const struct dotdot pairs[] = {
{ "/a/b/c/./../../g", "/a/g" },
{ "mid/content=5/../6", "mid/6" },
{ "/", "/" },
{ "", "" },
{ "/.../", "/.../" },
+ { "./moo", "moo" },
+ { "../moo", "moo" },
+ { "/.", "/" },
+ { "/..", "/" },
+ { "/moo/..", "/" },
+ { "..", "" },
+ { ".", "" },
};
- for(i=0; i < sizeof(pairs)/sizeof(pairs[0]); i++) {
- char *out = Curl_dedotdotify((char *)pairs[i].input);
+ for(i = 0; i < sizeof(pairs)/sizeof(pairs[0]); i++) {
+ char *out = Curl_dedotdotify(pairs[i].input);
abort_unless(out != NULL, "returned NULL!");
if(strcmp(out, pairs[i].output)) {