diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-01-30 15:18:51 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-01-30 15:18:51 +0200 |
commit | e5ba67bb11b55c1f3d48762ff17762d231b2361c (patch) | |
tree | 8e3a744d0ed2aa12a99c0c9a66171fb800fb8c9d /tests | |
parent | ea06607fd65dcf820b462c5d648e2c7e5a04ca02 (diff) |
Ignore version revision in package dependencies resolution
Diffstat (limited to 'tests')
-rw-r--r-- | tests/load/1/math/packages | 4 | ||||
-rw-r--r-- | tests/load/1/misc/packages | 4 | ||||
-rw-r--r-- | tests/load/1/testing/packages | 10 | ||||
-rw-r--r-- | tests/load/driver.cxx | 30 |
4 files changed, 34 insertions, 14 deletions
diff --git a/tests/load/1/math/packages b/tests/load/1/math/packages index dbeda89..9c8bfea 100644 --- a/tests/load/1/math/packages +++ b/tests/load/1/math/packages @@ -18,7 +18,7 @@ location: libstudxml-1.0.0+1.tar.gz sha256sum: 05ccba3da34dd0296866027a26b6bacf08cacc80f54516d3b8d8eeccbe31ab93 : name: libexp -version: 1~1.2 +version: 1~1.2+1 summary: The exponent description: The exponent math function. license: MIT @@ -26,7 +26,7 @@ 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+1.tar.gz sha256sum: 15ccba3da34dd0296866027a26b6bacf08cacc80f54516d3b8d8eeccbe31ab93 : name: libfoo diff --git a/tests/load/1/misc/packages b/tests/load/1/misc/packages index b5bb275..9cffca5 100644 --- a/tests/load/1/misc/packages +++ b/tests/load/1/misc/packages @@ -2,7 +2,7 @@ sha256sum: 2f2b297be1eafd70fe55f179a0cf062baf8405e08b3854600801420132a206b1 : name: libbar -version: 2.3.5 +version: 2.4.0+3 priority: security; Very important to install. summary: The Bar library description: very very good library. @@ -14,7 +14,7 @@ depends: libfoo depends: libmath >= 2.0.0 requires: linux | windows | macosx changes: some changes -location: libbar-2.3.5.tar.gz +location: libbar-2.4.0+3.tar.gz sha256sum: 70ccba3da34dd0296866027a26b6bacf08cacc80f54516d3b8d8eeccbe31ab93 : name: libfoo diff --git a/tests/load/1/testing/packages b/tests/load/1/testing/packages index 82fcc90..a903878 100644 --- a/tests/load/1/testing/packages +++ b/tests/load/1/testing/packages @@ -10,3 +10,13 @@ email: misc-users@example.com depends: libexpat >= 5.0 location: libmisc-2.4.0.tar.gz sha256sum: 75ccba3da34dd0296866027a26b6bacf08cacc80f54516d3b8d8eeccbe31ab94 +: +name: libmisc +version: 2.3.0+1 +summary: The Misc Library +license: MIT +url: http://www.example.com/misc/ +email: misc-users@example.com +depends: libexpat >= 5.0 +location: libmisc-2.3.0+1.tar.gz +sha256sum: 11ccba3da34dd0296866027a26b6bacf08cacc80f54516d3b8d8eeccbe31ab94 diff --git a/tests/load/driver.cxx b/tests/load/driver.cxx index 7a70ff5..992ce2d 100644 --- a/tests/load/driver.cxx +++ b/tests/load/driver.cxx @@ -117,7 +117,7 @@ main (int argc, char* argv[]) transaction t (db.begin ()); assert (db.query<repository> ().size () == 5); - assert (db.query<package> ().size () == 15); + assert (db.query<package> ().size () == 16); shared_ptr<repository> sr (db.load<repository> ("cppget.org/stable")); shared_ptr<repository> mr (db.load<repository> ("cppget.org/math")); @@ -388,7 +388,7 @@ 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+1")))); assert (check_location (epv)); shared_ptr<package> fpv5 ( @@ -593,7 +593,7 @@ main (int argc, char* argv[]) assert (!cr->internal); shared_ptr<package> bpv ( - db.load<package> (package_id ("libbar", version ("2.3.5")))); + db.load<package> (package_id ("libbar", version ("2.4.0+3")))); assert (check_location (bpv)); shared_ptr<package> fpv0 ( @@ -610,7 +610,7 @@ main (int argc, char* argv[]) // Verify libbar package version. // - // libbar-2.3.5 + // libbar-2.4.0+3 // assert (check_external (*bpv)); assert (bpv->other_repositories.size () == 1); @@ -655,6 +655,10 @@ main (int argc, char* argv[]) db.load<package> (package_id ("libmisc", version ("2.4.0")))); assert (check_location (mpv0)); + shared_ptr<package> mpv1 ( + db.load<package> (package_id ("libmisc", version ("2.3.0+1")))); + assert (check_location (mpv1)); + assert (tr->prerequisites.empty ()); assert (tr->complements.size () == 1); assert (tr->complements[0].load () == gr); @@ -667,6 +671,12 @@ main (int argc, char* argv[]) assert (mpv0->other_repositories.size () == 1); assert (mpv0->other_repositories[0].load () == tr); + // libmisc-2.3.0+1 + // + assert (check_external (*mpv1)); + assert (mpv1->other_repositories.size () == 1); + assert (mpv1->other_repositories[0].load () == tr); + // Verify 'staging' repository. // assert (gr->location.canonical_name () == "cppget.org/staging"); @@ -696,9 +706,9 @@ main (int argc, char* argv[]) db.load<package> (package_id ("libgenx", version ("1.0")))); assert (check_location (gpv)); - shared_ptr<package> mpv1 ( + shared_ptr<package> mpv2 ( db.load<package> (package_id ("libmisc", version ("1.0")))); - assert (check_location (mpv1)); + assert (check_location (mpv2)); assert (gr->prerequisites.empty ()); assert (gr->complements.empty ()); @@ -723,9 +733,9 @@ main (int argc, char* argv[]) // // libmisc-1.0 // - assert (check_external (*mpv1)); - assert (mpv1->other_repositories.size () == 1); - assert (mpv1->other_repositories[0].load () == gr); + assert (check_external (*mpv2)); + assert (mpv2->other_repositories.size () == 1); + assert (mpv2->other_repositories[0].load () == gr); // Change package summary, update the object persistent state, rerun // loader and ensure the model were not rebuilt. @@ -740,7 +750,7 @@ main (int argc, char* argv[]) transaction t (db.begin ()); shared_ptr<package> bpv ( - db.load<package> (package_id ("libbar", version ("2.3.5")))); + db.load<package> (package_id ("libbar", version ("2.4.0+3")))); assert (bpv->summary == "test"); |