diff --git a/test/TestFileImpure.m b/test/TestFileImpure.m index 37276e8..20b5c9e 100644 --- a/test/TestFileImpure.m +++ b/test/TestFileImpure.m @@ -73,13 +73,16 @@ function test_expanduser(tc, in_expand, ref_expand) function test_null_file(tc) +tc.assumeFalse(ispc) tc.verifyTrue(isfile(stdlib.null_file), "Null file not exist") end function test_is_regular_file(tc) -tc.assumeTrue(isfile(stdlib.null_file), "null file not exist") +if ~ispc + tc.assumeTrue(isfile(stdlib.null_file), "null file not exist") +end tc.verifyFalse(stdlib.is_regular_file(stdlib.null_file), "null file is not a regular file") end @@ -153,7 +156,10 @@ function test_canonical(tc) r = stdlib.parent(mfilename('fullpath')); tc.verifyEqual(stdlib.canonical(fullfile(r, "..")), stdlib.parent(r)) +% on windows, ~ is expanded even without expanduser +if ~ispc tc.verifyThat(stdlib.canonical("~", false), EndsWithSubstring("~")) +end h = stdlib.homedir; tc.verifyEqual(stdlib.canonical("~"), h)