diff options
Diffstat (limited to 'tools/slang-test/unit-test-path.cpp')
| -rw-r--r-- | tools/slang-test/unit-test-path.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/tools/slang-test/unit-test-path.cpp b/tools/slang-test/unit-test-path.cpp index e9cfbe2e3..712453e23 100644 --- a/tools/slang-test/unit-test-path.cpp +++ b/tools/slang-test/unit-test-path.cpp @@ -35,7 +35,27 @@ static void pathUnitTest() SLANG_CHECK(Path::Simplify("a:\\what\\..\\.\\..\\is\\.\\..\\this\\.\\") == "a:/../this"); + SLANG_CHECK(Path::Simplify("tests/preprocessor/.\\pragma-once-a.h") == "tests/preprocessor/pragma-once-a.h"); + + + SLANG_CHECK(Path::IsRelative(".")); + SLANG_CHECK(Path::IsRelative("..")); + SLANG_CHECK(Path::IsRelative("blah/..")); + + SLANG_CHECK(Path::IsRelative("blah/.././a")); + SLANG_CHECK(Path::IsRelative("a") == false); + SLANG_CHECK(Path::IsRelative("blah/a") == false); + SLANG_CHECK(Path::IsRelative("a:\\blah/a") == false); + + + SLANG_CHECK(Path::IsRelative("a:/what/.././../is/./../this/.")); + + SLANG_CHECK(Path::IsRelative("a:/what/.././../is/./../this/./")); + + SLANG_CHECK(Path::IsRelative("a:\\what\\..\\.\\..\\is\\.\\..\\this\\.\\")); + + } } -SLANG_UNIT_TEST("Path", pathUnitTest);
\ No newline at end of file +SLANG_UNIT_TEST("Path", pathUnitTest); |
