From 20a456e33222ed31008db3c328f1e10c212acf00 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 12 Jun 2018 13:57:31 +0300 Subject: Make project url and email optional in package manifest --- tests/load/1/math/libfoo-1.0.tar.gz | Bin 258 -> 219 bytes tests/load/1/math/packages.manifest | 4 +-- tests/load/1/stable/libfoo-1.0.tar.gz | Bin 258 -> 219 bytes tests/load/1/stable/packages.manifest | 4 +-- tests/load/1/stable/signature.manifest | 20 +++++++------- tests/load/driver.cxx | 46 ++++++++++++++++----------------- 6 files changed, 35 insertions(+), 39 deletions(-) (limited to 'tests/load') diff --git a/tests/load/1/math/libfoo-1.0.tar.gz b/tests/load/1/math/libfoo-1.0.tar.gz index 5063f1b..2014fc1 100644 Binary files a/tests/load/1/math/libfoo-1.0.tar.gz and b/tests/load/1/math/libfoo-1.0.tar.gz differ diff --git a/tests/load/1/math/packages.manifest b/tests/load/1/math/packages.manifest index 3c6e325..50db2dc 100644 --- a/tests/load/1/math/packages.manifest +++ b/tests/load/1/math/packages.manifest @@ -21,10 +21,8 @@ name: libfoo version: 1.0 summary: The Foo Library license: MIT -url: http://www.example.com/foo/ -email: foo-users@example.com location: libfoo-1.0.tar.gz -sha256sum: d8ad319b55fdd19ff24cb0fcf9d61101289569f80b8688884389587cfafa1f1e +sha256sum: 0df6d45a3514c6101609bdcfefe7659b5754e505c6cf6b4107141d8217bb981d : name: libfoo version: 1.2.4+1 diff --git a/tests/load/1/stable/libfoo-1.0.tar.gz b/tests/load/1/stable/libfoo-1.0.tar.gz index 5063f1b..2014fc1 100644 Binary files a/tests/load/1/stable/libfoo-1.0.tar.gz and b/tests/load/1/stable/libfoo-1.0.tar.gz differ diff --git a/tests/load/1/stable/packages.manifest b/tests/load/1/stable/packages.manifest index d61b6e2..af3bc32 100644 --- a/tests/load/1/stable/packages.manifest +++ b/tests/load/1/stable/packages.manifest @@ -5,10 +5,8 @@ name: libfoo version: 1.0 summary: The Foo Library license: MIT -url: http://www.example.com/foo/ -email: foo-users@example.com location: libfoo-1.0.tar.gz -sha256sum: d8ad319b55fdd19ff24cb0fcf9d61101289569f80b8688884389587cfafa1f1e +sha256sum: 0df6d45a3514c6101609bdcfefe7659b5754e505c6cf6b4107141d8217bb981d : name: libfoo version: 1.2.2-alpha.1 diff --git a/tests/load/1/stable/signature.manifest b/tests/load/1/stable/signature.manifest index ccd7b66..b0fd9a8 100644 --- a/tests/load/1/stable/signature.manifest +++ b/tests/load/1/stable/signature.manifest @@ -1,13 +1,13 @@ : 1 -sha256sum: 5ecbb89c8e36b9743fe08a3e53ceefe410ac13f9e1549300a58bcf83aa17e30c +sha256sum: 6eaeabb5824a3174435c9dbfdd8eba8a6b3e29133dcd2963f69745a4bb704ed2 signature: \ -X16KuI/I780t/KA34PgPgxWMu6mELo08WQVm0Z8f00KvPR1xKow2NMNatDZmtA4oAgAnkUA0tU0Z -G1qdAxwRwCcAYGwKPDT/3hX2oExbyBpU22pTJyQ9nG67CTdv8FXaCrcEP2ZWX43LfQBqagYwNZYH -ZGKloFNwyT5dAc1z2eMBOqQ8cgT8glGOnk9p39Hb02HGhbeUiO/gLwVr7u76sibXZ9TjuXdiE4SE -uBByHhoQOPPvoBtBilDy5S0XqQAig3Rg1qDpURodXz7fgebbQ2HtjS9MNeU0kmdkKUxWjnvu13Gl -Y1VShELMXSdEVLBMYt+hUgrZnYIDN4DrYsMznsMs5qhmarJEs97Fu3oAhXaiaJaFiBQ2ZfbeTasR -apxe2IFzid70+xMTk5Z9HgGNyorNCPCgd6aia9yDqsdgxI4mw396JQjiwGhftwj9VFXPc95ZtDAu -0koVpL3S88jsIykIkmROo2ZldpKYb6TcegEgAwecnBp8dtZD8j4NnS4mS4qtgEwsiCP7JGCHpiPO -FbB697+Pekha81eMSyD7nQOztn0psXc/Qzy9q8LTDqfv/lOZEmvlKVCWoQaoJ8AaTAOs1jcsoS3H -msluQ6WrzbUkH7k79i1t7nOCRd7JzYYDKLvGx9kXBg0y7tZ6la1g05meDyqq0Udw5jUGqy1OW5I= +bA1yuTMl1f5jtqttXynHoFzNj3qzGftTSyphz2FGNIqVCaOc2NOYDQiKwmmC/atYiRr+mJ1DoTa5 +GHt7esk0sW2ozx8qRazZRmdh+kXveyRhBsGqtOFtpM7au+MOq/X9HaBz3xxc2sd21tw7nwbWSevS +mBtpZyvFNW3xO/ecj5XgfzoyrEiXxw1Uf7SGOso4gErddTZVZeV2XqGrEn4pulOEv1w595yvQ3R5 +9eiPj5eYr7ofFaXCHybIi2LQJOifieqQgkwKrMdck18B8XBp/GR3+uP9paHWQKVoRZGusKaNl12F +TaJkerP+I/WFiu/It0N/6foz57f7OyYAIL086/g7MXb1UwK0MhqkytuoJY2sy8PUUyD4HuNFkSYn +Xm25OqYALoX8e4Gzbr9VkpR+r6O3EO7FmyCPl/ivhjxyrl+Npj9qARwBstu+i3C0jtxRe3V5jVNV +D0q7w5MzU9GhZQpN3lW1nVn68dshLtNo5KYFHZtvLnL11Cis3ax0BE1cEPs37rStmJhQDBUnCC1z +oDPBZRi7EPHEkCyhq1/JBQT3kzbl7Ns24HZZJSUEDSya/vjTxyyoYT7Xry45sYiHCCIZ9mHSArLS +CFJa+27UdqPhIPt9um1sRLCW15djib3lvqqcfAykWyS3ELAduP3vV3CGxyCuSm6He91Y9S9OoIE= \ diff --git a/tests/load/driver.cxx b/tests/load/driver.cxx index 3538863..c86258b 100644 --- a/tests/load/driver.cxx +++ b/tests/load/driver.cxx @@ -43,12 +43,11 @@ check_location (shared_ptr& p) static bool check_external (const package& p) { - return p.summary.empty () && p.tags.empty () && !p.description && - p.url.empty () && !p.package_url && p.email.empty () && - !p.package_email && !p.internal () && p.other_repositories.size () > 0 && - p.priority == priority () && p.changes.empty () && - p.license_alternatives.empty () && p.dependencies.empty () && - p.requirements.empty () && !p.sha256sum; + return p.summary.empty () && p.tags.empty () && !p.description && !p.url && + !p.package_url && !p.email && !p.package_email && !p.internal () && + p.other_repositories.size () > 0 && p.priority == priority () && + p.changes.empty () && p.license_alternatives.empty () && + p.dependencies.empty () && p.requirements.empty () && !p.sha256sum; } namespace bpkg @@ -200,9 +199,9 @@ main (int argc, char* argv[]) assert (fpv1->summary == "The Foo Library"); assert (fpv1->tags.empty ()); assert (!fpv1->description); - assert (fpv1->url == "http://www.example.com/foo/"); + assert (!fpv1->url); assert (!fpv1->package_url); - assert (fpv1->email == "foo-users@example.com"); + assert (!fpv1->email); assert (!fpv1->package_email); assert (fpv1->internal_repository.load () == sr); @@ -223,7 +222,7 @@ main (int argc, char* argv[]) assert (check_location (fpv1)); assert (fpv1->sha256sum && *fpv1->sha256sum == - "d8ad319b55fdd19ff24cb0fcf9d61101289569f80b8688884389587cfafa1f1e"); + "0df6d45a3514c6101609bdcfefe7659b5754e505c6cf6b4107141d8217bb981d"); // libfoo-1.2.2 // @@ -234,9 +233,9 @@ main (int argc, char* argv[]) assert (fpv2->summary == "The Foo library"); assert (fpv2->tags == strings ({"c++", "foo"})); assert (!fpv2->description); - assert (fpv2->url == "http://www.example.com/foo/"); + assert (fpv2->url && *fpv2->url == "http://www.example.com/foo/"); assert (!fpv2->package_url); - assert (fpv2->email == "foo-users@example.com"); + assert (fpv2->email && *fpv2->email == "foo-users@example.com"); assert (!fpv2->package_email); assert (fpv2->internal_repository.load () == sr); @@ -287,9 +286,9 @@ main (int argc, char* argv[]) assert (fpv2a->summary == "The Foo library"); assert (fpv2a->tags == strings ({"c++", "foo"})); assert (!fpv2a->description); - assert (fpv2a->url == "http://www.example.com/foo/"); + assert (fpv2a->url && *fpv2a->url == "http://www.example.com/foo/"); assert (!fpv2a->package_url); - assert (fpv2a->email == "foo-users@example.com"); + assert (fpv2a->email && *fpv2a->email == "foo-users@example.com"); assert (!fpv2a->package_email); assert (fpv2a->internal_repository.load () == sr); @@ -357,9 +356,9 @@ main (int argc, char* argv[]) assert (fpv3->summary == "The Foo library"); assert (fpv3->tags == strings ({"c++", "foo"})); assert (!fpv3->description); - assert (fpv3->url == "http://www.example.com/foo/"); + assert (fpv3->url && *fpv3->url == "http://www.example.com/foo/"); assert (!fpv3->package_url); - assert (fpv3->email == "foo-users@example.com"); + assert (fpv3->email && *fpv3->email == "foo-users@example.com"); assert (!fpv3->package_email); assert (fpv3->internal_repository.load () == sr); @@ -395,9 +394,9 @@ main (int argc, char* argv[]) assert (fpv4->summary == "The Foo Library"); assert (fpv4->tags == strings ({"c++", "foo"})); assert (*fpv4->description == "Very good foo library."); - assert (fpv4->url == "http://www.example.com/foo/"); + assert (fpv4->url && *fpv4->url == "http://www.example.com/foo/"); assert (!fpv4->package_url); - assert (fpv4->email == "foo-users@example.com"); + assert (fpv4->email && *fpv4->email == "foo-users@example.com"); assert (!fpv4->package_email); assert (fpv4->internal_repository.load () == sr); @@ -464,9 +463,10 @@ main (int argc, char* argv[]) assert (xpv->tags == strings ({"c++", "xml", "parser", "serializer", "pull", "streaming", "modern"})); assert (!xpv->description); - assert (xpv->url == "http://www.codesynthesis.com/projects/libstudxml/"); + assert (xpv->url && + *xpv->url == "http://www.codesynthesis.com/projects/libstudxml/"); assert (!xpv->package_url); - assert (xpv->email == + assert (xpv->email && *xpv->email == email ("studxml-users@codesynthesis.com", "Public mailing list, posts by non-members " "are allowed but moderated.")); @@ -519,7 +519,7 @@ main (int argc, char* argv[]) "MATLAB.\n\nUseful for conversion of research code into " "production environments."); - assert (fpv5->url == "http://www.example.com/foo/"); + assert (fpv5->url && *fpv5->url == "http://www.example.com/foo/"); assert (fpv5->doc_url && *fpv5->doc_url == "http://www.example.org/projects/libfoo/man.xhtml" && @@ -531,7 +531,7 @@ main (int argc, char* argv[]) assert (fpv5->package_url && *fpv5->package_url == "http://www.example.com/foo/pack"); - assert (fpv5->email == "foo-users@example.com"); + assert (fpv5->email && *fpv5->email == "foo-users@example.com"); assert (fpv5->package_email && *fpv5->package_email == "pack@example.com"); @@ -634,9 +634,9 @@ main (int argc, char* argv[]) assert (epv->tags == strings ({"c++", "exponent"})); assert (epv->description && *epv->description == "The exponent math function."); - assert (epv->url == "http://www.exp.com"); + assert (epv->url && *epv->url == "http://www.exp.com"); assert (!epv->package_url); - assert (epv->email == email ("users@exp.com")); + assert (epv->email && *epv->email == email ("users@exp.com")); assert (!epv->package_email); assert (epv->build_email && *epv->build_email == "builds@exp.com"); -- cgit v1.1