aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/vcpkg-test
diff options
context:
space:
mode:
authorras0219 <533828+ras0219@users.noreply.github.com>2021-01-13 10:53:29 -0800
committerGitHub <noreply@github.com>2021-01-13 10:53:29 -0800
commitc239e8251051eb86a8439b916dcc7fc81554ec53 (patch)
tree3e6651bd74df4b04077d1bec7e72df9bd58125e2 /toolsrc/src/vcpkg-test
parenta904f297e5dd3ef225d6936ab87adf7b73812c8b (diff)
downloadvcpkg-c239e8251051eb86a8439b916dcc7fc81554ec53.tar.gz
vcpkg-c239e8251051eb86a8439b916dcc7fc81554ec53.zip
[vcpkg] Add parse checking for version fields and enable non-string versions outside 'versions' flag (#15580)
Diffstat (limited to 'toolsrc/src/vcpkg-test')
-rw-r--r--toolsrc/src/vcpkg-test/manifests.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/toolsrc/src/vcpkg-test/manifests.cpp b/toolsrc/src/vcpkg-test/manifests.cpp
index f03caf3bf..39e470075 100644
--- a/toolsrc/src/vcpkg-test/manifests.cpp
+++ b/toolsrc/src/vcpkg-test/manifests.cpp
@@ -136,6 +136,25 @@ TEST_CASE ("manifest versioning", "[manifests]")
"version-semver": "abcd#1"
})json",
true);
+
+ SECTION ("version syntax")
+ {
+ test_parse_manifest(R"json({
+ "name": "zlib",
+ "version-semver": "2020-01-01"
+ })json",
+ true);
+ test_parse_manifest(R"json({
+ "name": "zlib",
+ "version-date": "1.1.1"
+ })json",
+ true);
+ test_parse_manifest(R"json({
+ "name": "zlib",
+ "version": "1.2.3-rc3"
+ })json",
+ true);
+ }
}
TEST_CASE ("manifest constraints error hash", "[manifests]")