diff --git a/test/TestCaseReader.cpp b/test/TestCaseReader.cpp index decfa3cbc..fc8a2bfca 100644 --- a/test/TestCaseReader.cpp +++ b/test/TestCaseReader.cpp @@ -159,7 +159,9 @@ pair TestCaseReader::parseSourcesAndSettingsWithLineNumber(is soltestAssert(!externalSourceName.empty(), ""); fs::path externalSourceTarget(externalSourceString); fs::path testCaseParentDir = m_fileName.parent_path(); - if (!externalSourceTarget.is_relative()) + if (!externalSourceTarget.is_relative() || !externalSourceTarget.root_path().empty()) + // NOTE: UNC paths (ones starting with // or \\) are considered relative by Boost + // since they have an empty root directory (but non-empty root name). BOOST_THROW_EXCEPTION(runtime_error("External Source paths need to be relative to the location of the test case.")); fs::path externalSourceFullPath = testCaseParentDir / externalSourceTarget; string externalSourceContent;