Skip to content

Commit

Permalink
Fix path normalization tests
Browse files Browse the repository at this point in the history
They were backtracking too deep into the filesystem on Linux, where the
tests were running directly on `tmp/`.
  • Loading branch information
vmg committed Apr 10, 2011
1 parent a635940 commit fdd0cc9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/t00-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ BEGIN_TEST(path3, "prettify and validate a path to a file")
must_fail(ensure_file_path_normalized("d1/s1///s2/..//../s3/", NULL, 0));
must_pass(ensure_file_path_normalized("d1/s1//../s2/../../d2", "d2", CWD_AS_PREFIX | PATH_AS_SUFFIX));
must_fail(ensure_file_path_normalized("dir/sub/../", NULL, 0));
must_pass(ensure_file_path_normalized("../../a/../../b/c/d/../../e", "b/e", PATH_AS_SUFFIX));
must_pass(ensure_file_path_normalized("../a/../b/c/d/../../e", "b/e", PATH_AS_SUFFIX));
must_fail(ensure_file_path_normalized("....", NULL, 0));
must_fail(ensure_file_path_normalized("...", NULL, 0));
must_fail(ensure_file_path_normalized("./...", NULL, 0));
Expand Down Expand Up @@ -309,7 +309,7 @@ BEGIN_TEST(path4, "validate and prettify a path to a folder")
must_pass(ensure_dir_path_normalized("d1/s1///s2/..//../s3/", "d1/s3/", CWD_AS_PREFIX | PATH_AS_SUFFIX));
must_pass(ensure_dir_path_normalized("d1/s1//../s2/../../d2", "d2/", CWD_AS_PREFIX | PATH_AS_SUFFIX));
must_pass(ensure_dir_path_normalized("dir/sub/../", "dir/", CWD_AS_PREFIX | PATH_AS_SUFFIX));
must_pass(ensure_dir_path_normalized("../../a/../../b/c/d/../../e", "b/e/", PATH_AS_SUFFIX));
must_pass(ensure_dir_path_normalized("../a/../b/c/d/../../e", "b/e/", PATH_AS_SUFFIX));
must_fail(ensure_dir_path_normalized("....", NULL, 0));
must_fail(ensure_dir_path_normalized("...", NULL, 0));
must_fail(ensure_dir_path_normalized("./...", NULL, 0));
Expand Down

0 comments on commit fdd0cc9

Please sign in to comment.