Merge pull request #12701 from a3d4/fix-running-tests-from-any-drive

Fix running path-related tests from any Windows drive
This commit is contained in:
Kamil Śliwak
2022-02-28 12:58:45 +01:00
committed by GitHub
4 changed files with 42 additions and 13 deletions
+3 -2
View File
@@ -313,8 +313,9 @@ BOOST_AUTO_TEST_CASE(normalizeCLIPathForVFS_should_not_resolve_symlinks_unless_r
if (!createSymlinkIfSupportedByFilesystem(tempDir.path() / "abc", tempDir.path() / "sym", true))
return;
boost::filesystem::path expectedPrefixWithSymlinks = "/" / tempDir.path().relative_path();
boost::filesystem::path expectedPrefixWithoutSymlinks = "/" / boost::filesystem::weakly_canonical(tempDir).relative_path();
boost::filesystem::path expectedRootPath = FileReader::normalizeCLIRootPathForVFS(tempDir);
boost::filesystem::path expectedPrefixWithSymlinks = expectedRootPath / tempDir.path().relative_path();
boost::filesystem::path expectedPrefixWithoutSymlinks = expectedRootPath / boost::filesystem::weakly_canonical(tempDir).relative_path();
BOOST_CHECK_EQUAL(
FileReader::normalizeCLIPathForVFS(tempDir.path() / "sym/contract.sol", SymlinkResolution::Disabled),