r257260 - [vfs] Normalize working directory if requested.

Ismail Donmez via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 9 22:59:36 PST 2016


Hi,

> +  NormalizedFS.setCurrentWorkingDirectory("/b/c");
> +  NormalizedFS.setCurrentWorkingDirectory(".");
> +  ASSERT_EQ("/b/c", NormalizedFS.getCurrentWorkingDirectory().get());
> +  NormalizedFS.setCurrentWorkingDirectory("..");
> +  ASSERT_EQ("/b", NormalizedFS.getCurrentWorkingDirectory().get());
>  }

This test fails on Windows (MSVC 2015 x64):

******************** TEST 'Clang-Unit ::
Basic/BasicTests.exe/InMemoryFileSystemTest.WorkingDirectory' FAILED
****************
****
Note: Google Test filter = InMemoryFileSystemTest.WorkingDirectory
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from InMemoryFileSystemTest
[ RUN      ] InMemoryFileSystemTest.WorkingDirectory
..\tools\clang\unittests\Basic\VirtualFileSystemTest.cpp(663): error:
Value of: NormalizedFS.getCurrentWorkingDirectory().get(
)
  Actual: "/b\\c"
Expected: "/b/c"
[  FAILED  ] InMemoryFileSystemTest.WorkingDirectory (0 ms)
[----------] 1 test from InMemoryFileSystemTest (0 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (0 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] InMemoryFileSystemTest.WorkingDirectory

 1 FAILED TEST

********************


More information about the cfe-commits mailing list