aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-06-03 22:56:45 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-06-04 15:24:51 +0300
commit045563bb01a3fb9de9371854cbc16b77860c221b (patch)
tree928225401c145f00d9eb8e5467d92339d63d7d98 /tests
parent05d77beb95f52351c16b2f0af74a0099dd5dba27 (diff)
Add support for topics and keywords package manifest values
Diffstat (limited to 'tests')
-rw-r--r--tests/load/1/math/libfoo-1.2.4+1.tar.gzbin964 -> 990 bytes
-rw-r--r--tests/load/1/math/packages.manifest11
-rw-r--r--tests/load/1/misc/packages.manifest2
-rw-r--r--tests/load/1/stable/packages.manifest8
-rw-r--r--tests/load/1/stable/signature.manifest20
-rw-r--r--tests/load/driver.cxx45
6 files changed, 50 insertions, 36 deletions
diff --git a/tests/load/1/math/libfoo-1.2.4+1.tar.gz b/tests/load/1/math/libfoo-1.2.4+1.tar.gz
index 29b0c55..94deae1 100644
--- a/tests/load/1/math/libfoo-1.2.4+1.tar.gz
+++ b/tests/load/1/math/libfoo-1.2.4+1.tar.gz
Binary files differ
diff --git a/tests/load/1/math/packages.manifest b/tests/load/1/math/packages.manifest
index 49caea6..74984e9 100644
--- a/tests/load/1/math/packages.manifest
+++ b/tests/load/1/math/packages.manifest
@@ -7,7 +7,7 @@ upstream-version: 1.2.abc.15-x
project: mathLab
summary: The exponent
license: MIT
-tags: mathlab, c++, exponent
+keywords: mathlab c++ exponent
description: The exponent math function.
description-type: text/plain
url: http://exp.example.com
@@ -46,7 +46,8 @@ priority: high; Critical bug fixes, performance improvement.
summary: The Foo Math Library
license: LGPLv2, MIT; If using with GNU TLS.
license: BSD; If using with OpenSSL.
-tags: c++, foo, math
+topics: math library, math API, libbaz fork
+keywords: c++ foo math best
description: \
A modern C++ library with easy to use linear algebra and lot of optimization
tools.
@@ -79,13 +80,13 @@ 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
-sha256sum: 92eb89770be390cbac9e0113763e0c10c43a4530667f5572571895617368369a
+sha256sum: 0a206d2b5e575549914ed43b87470b33512e975fffa4fc8f3eb92b3dea66979e
:
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
+keywords: postgresql database client library c
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
@@ -121,7 +122,7 @@ name: libstudxml
version: 1.0.0+1
summary: Modern C++ XML API
license: MIT
-tags: c++, xml, parser, serializer, pull, streaming, modern
+keywords: c++ xml parser serializer pull
url: http://www.codesynthesis.com/projects/libstudxml/
email: studxml-users@example.com; Public mailing list, posts by non-members\
are allowed but moderated.
diff --git a/tests/load/1/misc/packages.manifest b/tests/load/1/misc/packages.manifest
index 1f1571b..f02ce01 100644
--- a/tests/load/1/misc/packages.manifest
+++ b/tests/load/1/misc/packages.manifest
@@ -8,7 +8,7 @@ summary: The Bar library
description: very very good library.
description-type: text/plain
license: GPLv2
-tags: c++, bar
+keywords: c++, bar
url: http://www.example.com/bar/
email: bar-users@example.com
depends: libfoo
diff --git a/tests/load/1/stable/packages.manifest b/tests/load/1/stable/packages.manifest
index c1d4f1a..85109f6 100644
--- a/tests/load/1/stable/packages.manifest
+++ b/tests/load/1/stable/packages.manifest
@@ -17,7 +17,7 @@ version: 1.2.2-alpha.1
priority: security
summary: The Foo library
license: MIT
-tags: c++, foo
+keywords: c++ foo
url: ftp://www.example.com/foo/
email: foo-users@example.com
depends: libmisc [0.1 2.0-) | libmisc [2.0 5.0]
@@ -30,7 +30,7 @@ name: libfoo
version: 1.2.2
summary: The Foo library
license: MIT
-tags: c++, foo
+keywords: c++ foo
url: http://www.example.com/foo/
email: foo-users@example.com
depends: libbar <= 2.4.0
@@ -43,7 +43,7 @@ version: 1.2.3+4
priority: medium
summary: The Foo library
license: MIT
-tags: c++, foo
+keywords: c++ foo
url: http://www.example.com/foo/
email: foo-users@example.com
depends: libmisc >= 2.0.0
@@ -54,7 +54,7 @@ name: libfoo
version: 1.2.4
summary: The Foo Library
license: MIT; Permissive free software license.
-tags: c++, foo
+keywords: c++ foo
description: Very good foo library.
description-type: text/plain
changes: some changes 1
diff --git a/tests/load/1/stable/signature.manifest b/tests/load/1/stable/signature.manifest
index 931ecd4..45d160e 100644
--- a/tests/load/1/stable/signature.manifest
+++ b/tests/load/1/stable/signature.manifest
@@ -1,13 +1,13 @@
: 1
-sha256sum: 880d24ea372048c9d250410d747b330503bdf216df70e3ea11ad6aef7a58b7b9
+sha256sum: f4fadfdc3586c8b94dce871328625f43636e43b4a073c4ee577af41780eeb8f3
signature: \
-rYCyTiDI3qJ7XD1IfzLiJcnUO6hEToJYHH/WwCYXuwWULHZL/utADNVh2dB0zN/Rzm5ONy9qK9Ik
-560sE00tZ1XusU9C4o8B/WGvP2yEDIstF4E1ExwhIO8Y9sDgXpqCZfG/iw7hZYsZNJuzTnArUnSu
-TK/Eubg8tbKolqVlx9GJ2/LXgbZsi0ZiKmEuY7T1IWboU5xMjfBuGEmh2pe838X4VfyhHanmV3S9
-jvthQJ3BR4vZW66UM20/ZWgKw32baYLKbq9br0lXsfnoEPDXDjtb0lOYjy9osa0dKLRF5++Owg2y
-Mtd9RcmI0b8bGdfU8Z176sVXIp53RXlyMgjyewd4ycwWrz+VbIbR0c9AL8ZPHAwBpj8EHh/0IPPI
-CqoEnYChJqWZaUQPzIdS7a+6rXbCllGXyyT3RZjgIiY+PCIp7ZMvcOArfOFzqOTMPOptF0JKUIoC
-v+dzrrzHTA7duu9g+CT5Ag0WKLR0g+Izq3zyQa6YvOAdTFgUaPzd3W7NWP6N+YNeCc8jzGpCdFHY
-1vvDHdNuKVNjSlUtXU5jjJglH2qgnct5SCav76lCKmQBF5PNznwp8R/mb5amIGBOzfRlB9ZN/fSL
-XBM66Z5ObCDViMAliO4RBzoVnSv0y2SwpW+phqrSOzFTm+tDZE63oNh802yf+9/PHcIe48nMuhk=
+J40HIcLQQI+1rzXzRo0OOJRk1NTmLNNFk+RUi/NM7M6vUFjjq4nIABR+bg8RdenpybVASTyJYNTL
+/pLStEF+hg5SnufsYvpJJmstBMY4JXAcOfngUz4UVe8QS9zu3YGL5y/MBnYU+SKBbHnjRsTbRgak
+LjoVbTKH6kkPkZ8MZMXzo/0un2L4w4uZLNDeqjJBg2OFztPIV3RYzBdCcxJ+k20UJjVfmNQWaBki
+eaXVIsOxQ1bqWfg5uvACYvSgAIB+6ZIQFf8VYAJvnSieTswyWTxBXvj0D6aNnksQisaSbsRUuVb/
+zKYNWDrZFOjlNLEt+3bv3WQ5r0RqeRu7x9tdlXMfX/z9qu3SRe/mmaEpArkO67OKuVW1EDIo4Pwd
+6zOQZUBvy3wd5RJWCfEbcuIBNBWL3jWOhWK36V9NzCWzeDzh22D0P9WEYNGd9Xn0+GeXpuiD/1w1
+IkVy9FA/2DYBb/UgNvWLaGWeTFqmv+ZcLKs8uuNHoM33EpI2jQetDS24QeOmqImmRsLROjyCxVye
+yU3Dew5HRLK3KxNtC5XewK24eEdAQID7UEesn7X/MYfuyS1hq415YUibZswG7UIChj082xKHHcME
+zrEgdJ29+I3ZQkpTBaY/77Pu6UFvcpPbak0SCc6FHPvWKwXHPv2ATsInKs0J/WLdsL8sgaM2f3I=
\
diff --git a/tests/load/driver.cxx b/tests/load/driver.cxx
index 4f075aa..db4ed8c 100644
--- a/tests/load/driver.cxx
+++ b/tests/load/driver.cxx
@@ -43,11 +43,22 @@ check_location (shared_ptr<package>& p)
static bool
check_external (const package& p)
{
- 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;
+ return p.summary.empty () &&
+ p.topics.empty () &&
+ p.keywords.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
@@ -348,7 +359,7 @@ test_pkg_repos (const cstrings& loader_args,
assert (fpvxy->project == package_name ("libfoo"));
assert (fpvxy->summary == "The Foo Library");
- assert (fpvxy->tags.empty ());
+ assert (fpvxy->keywords.empty ());
assert (!fpvxy->description);
assert (!fpvxy->url);
assert (!fpvxy->package_url);
@@ -380,7 +391,7 @@ test_pkg_repos (const cstrings& loader_args,
package_id (tenant, package_name ("libfoo"), version ("1.0"))));
assert (fpv1->summary == "The Foo Library");
- assert (fpv1->tags.empty ());
+ assert (fpv1->keywords.empty ());
assert (!fpv1->description);
assert (!fpv1->url);
assert (!fpv1->package_url);
@@ -414,7 +425,7 @@ test_pkg_repos (const cstrings& loader_args,
package_id (tenant, package_name ("libfoo"), version ("1.2.2"))));
assert (fpv2->summary == "The Foo library");
- assert (fpv2->tags == strings ({"c++", "foo"}));
+ assert (fpv2->keywords == strings ({"c++", "foo"}));
assert (!fpv2->description);
assert (fpv2->url && fpv2->url->string () == "http://www.example.com/foo/");
assert (!fpv2->package_url);
@@ -458,7 +469,7 @@ test_pkg_repos (const cstrings& loader_args,
version ("1.2.2-alpha.1"))));
assert (fpv2a->summary == "The Foo library");
- assert (fpv2a->tags == strings ({"c++", "foo"}));
+ assert (fpv2a->keywords == strings ({"c++", "foo"}));
assert (!fpv2a->description);
assert (fpv2a->url && fpv2a->url->string () == "ftp://www.example.com/foo/");
assert (!fpv2a->package_url);
@@ -518,7 +529,7 @@ test_pkg_repos (const cstrings& loader_args,
package_id (tenant, package_name ("libfoo"), version ("1.2.3+4"))));
assert (fpv3->summary == "The Foo library");
- assert (fpv3->tags == strings ({"c++", "foo"}));
+ assert (fpv3->keywords == strings ({"c++", "foo"}));
assert (!fpv3->description);
assert (fpv3->url && fpv3->url->string () == "http://www.example.com/foo/");
assert (!fpv3->package_url);
@@ -554,7 +565,7 @@ test_pkg_repos (const cstrings& loader_args,
package_id (tenant, package_name ("libfoo"), version ("1.2.4"))));
assert (fpv4->summary == "The Foo Library");
- assert (fpv4->tags == strings ({"c++", "foo"}));
+ assert (fpv4->keywords == strings ({"c++", "foo"}));
assert (*fpv4->description == "Very good foo library.");
assert (fpv4->url && fpv4->url->string () == "http://www.example.com/foo/");
assert (!fpv4->package_url);
@@ -622,8 +633,8 @@ test_pkg_repos (const cstrings& loader_args,
version ("1.0.0+1"))));
assert (xpv->summary == "Modern C++ XML API");
- assert (xpv->tags == strings ({"c++", "xml", "parser", "serializer",
- "pull", "streaming", "modern"}));
+ assert (xpv->keywords ==
+ strings ({"c++", "xml", "parser", "serializer", "pull"}));
assert (!xpv->description);
assert (xpv->url &&
xpv->url->string () == "http://www.codesynthesis.com/projects/libstudxml/");
@@ -678,7 +689,9 @@ test_pkg_repos (const cstrings& loader_args,
package_id (tenant, package_name ("libfoo"), version ("1.2.4+1"))));
assert (fpv5->summary == "The Foo Math Library");
- assert (fpv5->tags == strings ({"c++", "foo", "math"}));
+ assert (fpv5->topics ==
+ strings ({"math library", "math API", "libbaz fork"}));
+ assert (fpv5->keywords == strings ({"c++", "foo", "math", "best"}));
assert (*fpv5->description ==
"A modern C++ library with easy to use linear algebra and lot "
"of optimization\ntools.\n\nThere are over 100 functions in "
@@ -782,7 +795,7 @@ test_pkg_repos (const cstrings& loader_args,
assert (check_location (fpv5));
assert (fpv5->sha256sum && *fpv5->sha256sum ==
- "92eb89770be390cbac9e0113763e0c10c43a4530667f5572571895617368369a");
+ "0a206d2b5e575549914ed43b87470b33512e975fffa4fc8f3eb92b3dea66979e");
// Verify libexp package version.
//
@@ -795,7 +808,7 @@ test_pkg_repos (const cstrings& loader_args,
assert (epv->upstream_version && *epv->upstream_version == "1.2.abc.15-x");
assert (epv->project == "mathLab");
assert (epv->summary == "The exponent");
- assert (epv->tags == strings ({"mathlab", "c++", "exponent"}));
+ assert (epv->keywords == strings ({"mathlab", "c++", "exponent"}));
assert (epv->description && *epv->description ==
"The exponent math function.");
assert (epv->url && epv->url->string () == "http://exp.example.com");