Skip to content

Commit 4318a62

Browse files
committed
[TMP] Add a test that fails on Windows due to boost bug
1 parent 50a5424 commit 4318a62

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/solc/CommandLineInterface.cpp

+13
Original file line numberDiff line numberDiff line change
@@ -830,6 +830,19 @@ BOOST_AUTO_TEST_CASE(cli_paths_to_source_unit_names_symlinks)
830830
BOOST_TEST(result.reader.basePath() == expectedWorkDir / "sym/z/");
831831
}
832832

833+
BOOST_AUTO_TEST_CASE(cli_paths_to_source_unit_names_invalid_base_path_triggering_boost_bug)
834+
{
835+
TemporaryDirectory tempDir(TEST_CASE_NAME);
836+
createFilesWithParentDirs({tempDir.path() / "contract.sol"});
837+
838+
string expectedMessage = "Base path does not exist: \"" + (tempDir.path() / "a/../b/c/").string() + "\"\n";
839+
840+
vector<string> commandLine = {"solc", "contract.sol", "--base-path", (tempDir.path() / "a/../b/c/").string()};
841+
OptionsReaderAndMessages result = parseCommandLineAndReadInputFiles(commandLine);
842+
BOOST_TEST(!result.success);
843+
BOOST_TEST(result.stderrContent == expectedMessage);
844+
}
845+
833846
BOOST_AUTO_TEST_SUITE_END()
834847

835848
} // namespace solidity::frontend::test

0 commit comments

Comments
 (0)