diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/load/1/math/libexp-1~1.2+1.tar.gz | bin | 291 -> 302 bytes | |||
-rw-r--r-- | tests/load/1/math/libpq-0.tar.gz | bin | 0 -> 807 bytes | |||
-rw-r--r-- | tests/load/1/math/packages | 38 | ||||
-rw-r--r-- | tests/load/driver.cxx | 31 |
4 files changed, 60 insertions, 9 deletions
diff --git a/tests/load/1/math/libexp-1~1.2+1.tar.gz b/tests/load/1/math/libexp-1~1.2+1.tar.gz Binary files differindex c74e2b9..937a084 100644 --- a/tests/load/1/math/libexp-1~1.2+1.tar.gz +++ b/tests/load/1/math/libexp-1~1.2+1.tar.gz diff --git a/tests/load/1/math/libpq-0.tar.gz b/tests/load/1/math/libpq-0.tar.gz Binary files differnew file mode 100644 index 0000000..a689660 --- /dev/null +++ b/tests/load/1/math/libpq-0.tar.gz diff --git a/tests/load/1/math/packages b/tests/load/1/math/packages index 7d09a03..9e1c30f 100644 --- a/tests/load/1/math/packages +++ b/tests/load/1/math/packages @@ -10,8 +10,9 @@ description: The exponent math function. url: http://www.exp.com email: users@exp.com depends: libmisc +depends: libpq >= 9.0.0 location: libexp-1~1.2+1.tar.gz -sha256sum: 6c1869459964c8c780bd63d67e4c0727e583965e7280fd1f31be3f3639206191 +sha256sum: 49172533e10e1dd9b8f80bcd25d25397f143ba49a944cd8cb8fd273823b7c10e : name: libfoo version: 1.0 @@ -60,6 +61,41 @@ requires: ? vc++ >= 12.0; Only if using VC++ on Windows. location: libfoo-1.2.4+1.tar.gz sha256sum: 6bf9de8c4647a32dee79ad5e787c10311495e3f6b5727bfd03b2d9dcd6a16eed : +name: libpq +version: 0 +summary: PostgreSQL C API client library +license: PostgreSQL License; Permissive free software license. +tags: postgresql, database, client, library, c, api, interface +description: \ +PostgreSQL is an object-relational SQL database management system with libpq +being its C client library. Applications can use this library to pass queries +to the PostgreSQL backend server and to receive the results of those queries +using the C programming language. For more information see: + +https://www.postgresql.org/ + +This package currently contains a build2 package manager (bpkg) stub meaning +that it can only be "built" as already installed in the underlying system (for +example, using a system package manager). + +Send questions, bug reports, or any other feedback about the library itself to +the PostgreSQL mailing lists. Send build system and packaging-related feedback +to the packaging@build2.org mailing list (see https://lists.build2.org for +posting guidelines, etc). + +The packaging of PostgreSQL for build2 is tracked in a Git repository at: + +https://git.build2.org/cgit/packaging/postgresql/ + +\ +url: https://www.postgresql.org/ +package-url: https://git.build2.org/cgit/packaging/postgresql/ +email: pgsql-general@postgresql.org; Mailing list. +package-email: packaging@build2.org; Mailing list. +requires: build2 >= 0.4.0 +location: libpq-0.tar.gz +sha256sum: 75958d000b641c588cdf48e3574584e070104097702dccffdad77947e37f9bd0 +: name: libstudxml version: 1.0.0+1 summary: Modern C++ XML API diff --git a/tests/load/driver.cxx b/tests/load/driver.cxx index 5f55701..597625f 100644 --- a/tests/load/driver.cxx +++ b/tests/load/driver.cxx @@ -71,15 +71,15 @@ main (int argc, char* argv[]) for (; i < argc - 1; ++i) { string n (argv[i]); - if (n == "--db-user") + if (n == "--db-user" || n == "-u") user = argv[++i]; else if (n == "--db-password") password = argv[++i]; - else if (n == "--db-name") + else if (n == "--db-name" || n == "-n") name = argv[++i]; - else if (n == "--db-host") + else if (n == "--db-host" || n == "-h") host = argv[++i]; - else if (n == "--db-port") + else if (n == "--db-port" || n == "-p") port = stoul (argv[++i]); } @@ -128,7 +128,7 @@ main (int argc, char* argv[]) transaction t (db.begin ()); assert (db.query<repository> ().size () == 7); - assert (db.query<package> ().size () == 16); + assert (db.query<package> ().size () == 17); shared_ptr<repository> sr ( db.load<repository> ("dev.cppget.org/stable")); @@ -621,16 +621,31 @@ main (int argc, char* argv[]) assert (epv->license_alternatives[0].size () == 1); assert (epv->license_alternatives[0][0] == "MIT"); - assert (epv->dependencies.size () == 1); + assert (epv->dependencies.size () == 2); assert (epv->dependencies[0].size () == 1); assert (epv->dependencies[0][0] == dep ("libmisc", nullopt)); + assert (epv->dependencies[1].size () == 1); + assert (epv->dependencies[1][0] == + dep ("libpq", + optional<dependency_constraint> ( + dependency_constraint ( + version ("9.0.0"), false, nullopt, true)))); + assert (epv->requirements.empty ()); assert (check_location (epv)); - assert (epv->sha256sum && *epv->sha256sum == - "6c1869459964c8c780bd63d67e4c0727e583965e7280fd1f31be3f3639206191"); + "49172533e10e1dd9b8f80bcd25d25397f143ba49a944cd8cb8fd273823b7c10e"); + + // Verify libpq package version. + // + // libpq-0 + // + shared_ptr<package> qpv ( + db.load<package> (package_id ("libpq", version ("0")))); + + assert (qpv->summary == "PostgreSQL C API client library"); // Verify 'misc' repository. // |