aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/tests.paragraph.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'toolsrc/src/tests.paragraph.cpp')
-rw-r--r--toolsrc/src/tests.paragraph.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/toolsrc/src/tests.paragraph.cpp b/toolsrc/src/tests.paragraph.cpp
index d9301abd0..13052610f 100644
--- a/toolsrc/src/tests.paragraph.cpp
+++ b/toolsrc/src/tests.paragraph.cpp
@@ -190,6 +190,20 @@ namespace UnitTest1
Assert::AreEqual("c", pgh.depends[2].c_str());
}
+ TEST_METHOD(BinaryParagraph_Abi)
+ {
+ vcpkg::BinaryParagraph pgh({
+ {"Package", "zlib"},
+ {"Version", "1.2.8"},
+ {"Architecture", "x86-windows"},
+ {"Multi-Arch", "same"},
+ {"Abi", "abcd123"},
+ });
+
+ Assert::AreEqual(size_t(0), pgh.depends.size());
+ Assert::IsTrue(pgh.abi == "abcd123");
+ }
+
TEST_METHOD(parse_paragraphs_empty)
{
const char* str = "";
@@ -385,5 +399,21 @@ namespace UnitTest1
Assert::AreEqual(size_t(1), pghs.size());
Assert::AreEqual("a, b, c", pghs[0]["Depends"].c_str());
}
+
+ TEST_METHOD(BinaryParagraph_serialize_abi)
+ {
+ vcpkg::BinaryParagraph pgh({
+ {"Package", "zlib"},
+ {"Version", "1.2.8"},
+ {"Architecture", "x86-windows"},
+ {"Multi-Arch", "same"},
+ {"Depends", "a, b, c"},
+ {"Abi", "123abc"},
+ });
+ std::string ss = Strings::serialize(pgh);
+ auto pghs = vcpkg::Paragraphs::parse_paragraphs(ss).value_or_exit(VCPKG_LINE_INFO);
+ Assert::AreEqual(size_t(1), pghs.size());
+ Assert::AreEqual("123abc", pghs[0]["Abi"].c_str());
+ }
};
}