* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, 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
unsigned int i;
int fails=0;
- struct dotdot pairs[] = {
+ const struct dotdot pairs[] = {
{ "/a/b/c/./../../g", "/a/g" },
{ "mid/content=5/../6", "mid/6" },
{ "/hello/../moo", "/moo" },
for(i=0; i < sizeof(pairs)/sizeof(pairs[0]); i++) {
char *out = Curl_dedotdotify((char *)pairs[i].input);
+ abort_unless(out != NULL, "returned NULL!");
if(strcmp(out, pairs[i].output)) {
fprintf(stderr, "Test %d: '%s' gave '%s' instead of '%s'\n",
free(out);
}
- return fails;
+ fail_if(fails, "output mismatched");
UNITTEST_STOP
-
-
-
-