change qualifier bracket to parens
MODIFY
src/SourceParagraph.cpp
src/SourceParagraph.cpp
@@ -160,7 +160,7 @@ namespace vcpkg
// expect of the form "\w+ \[\w+\]"
Dependency dep;
dep.name = depend_string.substr(0, pos);
- if (depend_string.c_str()[pos + 1] != '[' || depend_string[depend_string.size() - 1] != ']')
+ if (depend_string.c_str()[pos + 1] != '(' || depend_string[depend_string.size() - 1] != ')')
{
// Error, but for now just slurp the entire string.
return {depend_string, ""};

MODIFY
src/tests_dependencies.cpp
src/tests_dependencies.cpp
@@ -15,7 +15,7 @@ namespace UnitTest1
{
TEST_METHOD(parse_depends_one)
{
- auto v = expand_qualified_dependencies(parse_comma_list("libA [windows]"));
+ auto v = expand_qualified_dependencies(parse_comma_list("libA (windows)"));
Assert::AreEqual(size_t(1), v.size());
Assert::AreEqual("libA", v[0].name.c_str());
Assert::AreEqual("windows", v[0].qualifier.c_str());
@@ -23,7 +23,7 @@ namespace UnitTest1
TEST_METHOD(filter_depends)
{
- auto deps = expand_qualified_dependencies(parse_comma_list("libA [windows], libB, libC [uwp]"));
+ auto deps = expand_qualified_dependencies(parse_comma_list("libA (windows), libB, libC (uwp)"));
auto v = filter_dependencies(deps, Triplet::X64_WINDOWS);
Assert::AreEqual(size_t(2), v.size());
Assert::AreEqual("libA", v[0].c_str());

MODIFY
src/tests_paragraph.cpp
src/tests_paragraph.cpp
@@ -112,7 +112,7 @@ namespace UnitTest1
{
auto m_pgh =
vcpkg::SourceControlFile::parse_control_file(std::vector<std::unordered_map<std::string, std::string>>{{
- {"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "libA [windows], libB [uwp]"},
+ {"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "libA (windows), libB (uwp)"},
}});
Assert::IsTrue(m_pgh.has_value());
auto& pgh = *m_pgh.get();

change qualifier bracket to parens