diff options
Diffstat (limited to 'tests/manifest')
-rw-r--r-- | tests/manifest/driver.cxx | 8 | ||||
-rw-r--r-- | tests/manifest/testscript | 97 |
2 files changed, 101 insertions, 4 deletions
diff --git a/tests/manifest/driver.cxx b/tests/manifest/driver.cxx index c0d8693..fb40f7e 100644 --- a/tests/manifest/driver.cxx +++ b/tests/manifest/driver.cxx @@ -40,7 +40,7 @@ using namespace bpkg; // In the second form read and parse the package manifest from stdin and // serialize it to stdout. // -// -c complete the dependency constraints +// -c complete the incomplete values (depends, <distribution>-version, etc) // -i ignore unknown // // Note: the above options should go after -p on the command line. @@ -74,7 +74,7 @@ main (int argc, char* argv[]) { if (mode == "-p") { - bool complete_dependencies (false); + bool complete_values (false); bool ignore_unknown (false); bool long_lines (false); @@ -83,7 +83,7 @@ main (int argc, char* argv[]) string o (argv[i]); if (o == "-c") - complete_dependencies = true; + complete_values = true; else if (o == "-i") ignore_unknown = true; else if (o == "-l") @@ -114,7 +114,7 @@ main (int argc, char* argv[]) } }, ignore_unknown, - complete_dependencies).serialize (s); + complete_values).serialize (s); } else if (mode == "-ec") { diff --git a/tests/manifest/testscript b/tests/manifest/testscript index 336b288..f4a5282 100644 --- a/tests/manifest/testscript +++ b/tests/manifest/testscript @@ -606,6 +606,103 @@ } } + : distribution + : + { + : incomplete + : + { + $* <<EOF >>EOF + : 1 + name: libcrypto + version: 1.1.1+18 + upstream-version: 1.1.1n + summary: C library providing general cryptography and X.509 support + license: OpenSSL + debian-name: libssl1.1 libssl-dev + debian-version: 1.1.1n + debian-to-downstream-version: /([^.])\.([^.])\.([^.])n/\1.\2.\3+18/ + debian-to-downstream-version: /([^.])\.([^.])\.([^.])o/\1.\2.\3+19/ + debian-to-downstream-version: /([^.])\.([^.])\.([^.])p/\1.\2.\3+20/ + fedora-name: openssl-libs openssl-devel + fedora-version: $ + EOF + } + + : complete + : + { + $* -c <<EOI >>EOO + : 1 + name: libcrypto + version: +2-1.1.1-a.1+2 + upstream-version: 1.1.1n + summary: C library providing general cryptography and X.509 support + license: OpenSSL + fedora-name: openssl-libs openssl-devel + fedora-version: $ + fedora-to-downstream-version: $ + EOI + : 1 + name: libcrypto + version: +2-1.1.1-a.1+2 + upstream-version: 1.1.1n + summary: C library providing general cryptography and X.509 support + license: OpenSSL + fedora-name: openssl-libs openssl-devel + fedora-version: 1.1.1 + fedora-to-downstream-version: $ + EOO + } + + : multiple-names + : + { + $* <<EOO >>EOO + : 1 + name: libcrypto + version: 1.1.1+18 + upstream-version: 1.1.1n + summary: C library providing general cryptography and X.509 support + license: OpenSSL + debian-name: libcurl4 libcurl4-doc libcurl4-openssl-dev + debian-name: libcurl3-gnutls libcurl4-gnutls-dev + EOO + } + + : dash-in-name + : + { + $* <<EOI 2>>EOE != 0 + : 1 + name: libcrypto + version: 1.1.1+18 + upstream-version: 1.1.1n + summary: C library providing general cryptography and X.509 support + license: OpenSSL + de-bian-name: libssl1.1 libssl-dev + EOI + stdin:7:1: error: distribution name 'de-bian' contains '-' + EOE + } + + : empty-value + : + { + $* <<EOI 2>>EOE != 0 + : 1 + name: libcrypto + version: 1.1.1+18 + upstream-version: 1.1.1n + summary: C library providing general cryptography and X.509 support + license: OpenSSL + debian-name: + EOI + stdin:7:13: error: empty package distribution value + EOE + } + } + : depends : { |