aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Pozhylenkov <alex_pozhilenkov@adoriasoft.com>2021-01-29 01:00:25 +0200
committerGitHub <noreply@github.com>2021-01-28 15:00:25 -0800
commit8360db32083b8283fff96d177cbd80edadbdf35b (patch)
tree2038896bb5dc7b6337a6c9583d4fdf1c14df381a
parent55466813897a75aa443c5dfe6e32fb66c56847d1 (diff)
downloadvcpkg-8360db32083b8283fff96d177cbd80edadbdf35b.tar.gz
vcpkg-8360db32083b8283fff96d177cbd80edadbdf35b.zip
update tests (#15449)
-rw-r--r--toolsrc/src/vcpkg-test/paragraph.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/toolsrc/src/vcpkg-test/paragraph.cpp b/toolsrc/src/vcpkg-test/paragraph.cpp
index 356ee88f8..cb3f8e620 100644
--- a/toolsrc/src/vcpkg-test/paragraph.cpp
+++ b/toolsrc/src/vcpkg-test/paragraph.cpp
@@ -60,6 +60,7 @@ TEST_CASE ("SourceParagraph construct invalid", "[paragraph]")
}});
REQUIRE(!m_pgh.has_value());
+ REQUIRE(m_pgh.error()->has_error());
m_pgh = test_parse_control_file({{
{"Source", "zlib"},
@@ -68,6 +69,7 @@ TEST_CASE ("SourceParagraph construct invalid", "[paragraph]")
}});
REQUIRE(!m_pgh.has_value());
+ REQUIRE(m_pgh.error()->has_error());
m_pgh = test_parse_control_file({
{
@@ -81,6 +83,16 @@ TEST_CASE ("SourceParagraph construct invalid", "[paragraph]")
});
REQUIRE(!m_pgh.has_value());
+ REQUIRE(m_pgh.error()->has_error());
+
+ // invalid field`s name
+ m_pgh = test_parse_control_file({{
+ {"Surce", "zlib"},
+ {"Vursion", "1.2.8"},
+ }});
+
+ REQUIRE(!m_pgh.has_value());
+ REQUIRE(m_pgh.error()->has_error());
}
TEST_CASE ("SourceParagraph construct maximum", "[paragraph]")