diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2018-10-26 08:16:54 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-26 08:16:54 -0400 |
| commit | cb9d679a3a93c65c44904bf77811b9d74e431e23 (patch) | |
| tree | bdc78bc01351f6eeed4714d01cd3aef6cf067109 /tools | |
| parent | ad47fe71defcc96a7bed87a4c3a40543978f0fb8 (diff) | |
Feature/file system cache (#692)
* First pass at caching file system.
* default-file-system -> slang-file-system
fix problem with location("build.linux") confusing windows build for now.
* Added CompressedResult
Fix problem in Result construction with it being unsigned
* Add support for Path simplification.
* Testing for Path::Simplify.
* Refactored CacheFileSystem - automatically handles ISlangFileSystem or ISlangFileSystemExt appropriately.
Removed WrapFileSystem - because wasn't possible to emulate some of the behavior if just loadFile is implemented.
Split out StringBlob - so that no need to convert between ISlangBlob and String repeatidly.
* Remove unwanted code in ~CompileRequest
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/slang-test/unit-test-path.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/slang-test/unit-test-path.cpp b/tools/slang-test/unit-test-path.cpp index ddaa39d6d..e9cfbe2e3 100644 --- a/tools/slang-test/unit-test-path.cpp +++ b/tools/slang-test/unit-test-path.cpp @@ -21,6 +21,21 @@ static void pathUnitTest() String parentPath2 = Path::GetDirectoryName(path); SLANG_CHECK(parentPath == parentPath2); } + // Test the paths + { + SLANG_CHECK(Path::Simplify(".") == "."); + SLANG_CHECK(Path::Simplify("..") == ".."); + SLANG_CHECK(Path::Simplify("blah/..") == "."); + + SLANG_CHECK(Path::Simplify("blah/.././a") == "a"); + + SLANG_CHECK(Path::Simplify("a:/what/.././../is/./../this/.") == "a:/../this"); + + SLANG_CHECK(Path::Simplify("a:/what/.././../is/./../this/./") == "a:/../this"); + + SLANG_CHECK(Path::Simplify("a:\\what\\..\\.\\..\\is\\.\\..\\this\\.\\") == "a:/../this"); + + } } SLANG_UNIT_TEST("Path", pathUnitTest);
\ No newline at end of file |
