diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-12-25 19:59:45 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-01-08 18:26:00 +0200 |
commit | dd0f7ec5e776c25cbb0b6715bf62d52a9965f9b1 (patch) | |
tree | e8fc9bfd3e321dcff09b73b543635f02f456d0f7 /tests | |
parent | 0882ffc1e3480feb3c067c1f8c961fc384de17e9 (diff) |
Support version release
Diffstat (limited to 'tests')
-rw-r--r-- | tests/loader/1/math/packages | 14 | ||||
-rw-r--r-- | tests/loader/1/misc/packages | 8 | ||||
-rw-r--r-- | tests/loader/1/stable/packages | 15 | ||||
-rw-r--r-- | tests/loader/driver.cxx | 42 |
4 files changed, 56 insertions, 23 deletions
diff --git a/tests/loader/1/math/packages b/tests/loader/1/math/packages index 4d34c13..7b81c5e 100644 --- a/tests/loader/1/math/packages +++ b/tests/loader/1/math/packages @@ -1,6 +1,6 @@ : 1 name: libstudxml -version: 1.0.0-1 +version: 1.0.0+1 summary: Modern C++ XML API license: MIT tags: c++, xml, parser, serializer, pull, streaming, modern @@ -12,10 +12,10 @@ email: studxml-users@codesynthesis.com; Public mailing list, posts by\ package-email: boris@codesynthesis.com; Direct email to the author. depends: libexpat >= 2.0.0 depends: libgenx -location: libstudxml-1.0.0-1.tar.gz +location: libstudxml-1.0.0+1.tar.gz : name: libexp -version: 1+1.2 +version: 1~1.2 summary: The exponent description: The exponent math function. license: MIT @@ -23,10 +23,10 @@ tags: c++, exponent url: http://www.exp.com email: users@exp.com depends: libmisc -location: libexp-1+1.2.tar.gz +location: libexp-1~1.2.tar.gz : name: libfoo -version: 1.2.4-1 +version: 1.2.4+1 summary: The Foo Math Library description:\ A modern C++ library with easy to use linear algebra and lot of optimization @@ -52,9 +52,9 @@ requires: linux | windows | macosx; Symbian support is coming. requires: c++11 requires: ? ; libc++ standard library if using Clang on Mac OS X. requires: ? vc++ >= 12.0; Only if using VC++ on Windows. -location: libfoo-1.2.4-1.tar.gz +location: libfoo-1.2.4+1.tar.gz changes:\ -1.2.4-1 +1.2.4+1 * applied patch for critical bug-219 * regenerated documentation diff --git a/tests/loader/1/misc/packages b/tests/loader/1/misc/packages index e47208d..fec3780 100644 --- a/tests/loader/1/misc/packages +++ b/tests/loader/1/misc/packages @@ -31,17 +31,17 @@ email: foo-users@example.com location: libfoo-0.1.tar.gz : name: libfoo -version: 1.2.4-1 +version: 1.2.4+1 summary: Foo Library license: MIT url: http://www.example.com/foo/ email: foo-users@example.com -location: libfoo-1.2.4-1.tar.gz +location: libfoo-1.2.4+1.tar.gz : name: libfoo -version: 1.2.4-2 +version: 1.2.4+2 summary: Foo Library license: MIT url: http://www.example.com/foo/ email: foo-users@example.com -location: libfoo-1.2.4-2.tar.gz +location: libfoo-1.2.4+2.tar.gz diff --git a/tests/loader/1/stable/packages b/tests/loader/1/stable/packages index 756a562..1a385c3 100644 --- a/tests/loader/1/stable/packages +++ b/tests/loader/1/stable/packages @@ -1,13 +1,13 @@ : 1 name: libfoo -version: 1.2.3-4 +version: 1.2.3+4 summary: The Foo library license: MIT tags: c++, foo url: http://www.example.com/foo/ email: foo-users@example.com depends: libmisc >= 2.0.0 -location: libfoo-1.2.3-4.tar.gz +location: libfoo-1.2.3+4.tar.gz : name: libfoo version: 1.2.2 @@ -17,10 +17,19 @@ tags: c++, foo url: http://www.example.com/foo/ email: foo-users@example.com depends: libbar <= 2.4.0 -depends: libexp == 1+1.2 +depends: libexp == 1~1.2 location: libfoo-1.2.2.tar.gz : name: libfoo +version: 1.2.2-alpha.1 +summary: The Foo library +license: MIT +tags: c++, foo +url: http://www.example.com/foo/ +email: foo-users@example.com +location: libfoo-1.2.2-alpha.1.tar.gz +: +name: libfoo version: 1.2.4 summary: The Foo Library description: Very good foo library. diff --git a/tests/loader/driver.cxx b/tests/loader/driver.cxx index 7ca1e6e..51f2ed8 100644 --- a/tests/loader/driver.cxx +++ b/tests/loader/driver.cxx @@ -99,7 +99,7 @@ main (int argc, char* argv[]) transaction t (db.begin ()); assert (db.query<repository> ().size () == 5); - assert (db.query<package> ().size () == 14); + assert (db.query<package> ().size () == 15); shared_ptr<repository> sr (db.load<repository> ("cppget.org/stable")); shared_ptr<repository> mr (db.load<repository> ("cppget.org/math")); @@ -138,8 +138,12 @@ main (int argc, char* argv[]) db.load<package> (package_id ("libfoo", version ("1.2.2")))); assert (check_location (fpv2)); + shared_ptr<package> fpv2a ( + db.load<package> (package_id ("libfoo", version ("1.2.2-alpha.1")))); + assert (check_location (fpv2a)); + shared_ptr<package> fpv3 ( - db.load<package> (package_id ("libfoo", version ("1.2.3-4")))); + db.load<package> (package_id ("libfoo", version ("1.2.3+4")))); assert (check_location (fpv3)); shared_ptr<package> fpv4 ( @@ -218,9 +222,29 @@ main (int argc, char* argv[]) dep ( "libexp", optional<dependency_constraint> ( - dependency_constraint{comparison::eq, version ("1+1.2")}))); + dependency_constraint{comparison::eq, version ("1~1.2")}))); - assert (fpv2->requirements.empty ()); + // libfoo-1.2.2-alpha.1 + // + 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->package_url); + assert (fpv2a->email == "foo-users@example.com"); + assert (!fpv2a->package_email); + + assert (fpv2a->internal_repository.load () == sr); + assert (fpv2a->other_repositories.empty ()); + assert (fpv2a->priority == priority::low); + assert (fpv2a->changes.empty ()); + + assert (fpv2a->license_alternatives.size () == 1); + assert (fpv2a->license_alternatives[0].size () == 1); + assert (fpv2a->license_alternatives[0][0] == "MIT"); + + assert (fpv2a->dependencies.empty ()); + assert (fpv2a->requirements.empty ()); // libfoo-1.2.3-4 // @@ -303,15 +327,15 @@ main (int argc, char* argv[]) assert (mr->internal); shared_ptr<package> epv ( - db.load<package> (package_id ("libexp", version ("1+1.2")))); + db.load<package> (package_id ("libexp", version ("1~1.2")))); assert (check_location (epv)); shared_ptr<package> fpv5 ( - db.load<package> (package_id ("libfoo", version ("1.2.4-1")))); + db.load<package> (package_id ("libfoo", version ("1.2.4+1")))); assert (check_location (fpv5)); shared_ptr<package> xpv ( - db.load<package> (package_id ("libstudxml", version ("1.0.0-1")))); + db.load<package> (package_id ("libstudxml", version ("1.0.0+1")))); assert (check_location (xpv)); assert (mr->complements.empty ()); @@ -383,7 +407,7 @@ main (int argc, char* argv[]) assert (fpv5->priority.comment == "Critical bug fixes, performance improvement."); - const char ch[] = R"DLM(1.2.4-1 + const char ch[] = R"DLM(1.2.4+1 * applied patch for critical bug-219 * regenerated documentation @@ -512,7 +536,7 @@ main (int argc, char* argv[]) assert (check_location (fpv0)); shared_ptr<package> fpv6 ( - db.load<package> (package_id ("libfoo", version ("1.2.4-2")))); + db.load<package> (package_id ("libfoo", version ("1.2.4+2")))); assert (check_location (fpv6)); assert (cr->prerequisites.empty ()); |