summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/libopkg_test.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/libopkg_test.c b/tests/libopkg_test.c
index 67e4103..720e3e9 100644
--- a/tests/libopkg_test.c
+++ b/tests/libopkg_test.c
@@ -60,6 +60,7 @@ package_list_upgradable_callback (pkg_t *pkg, void *data)
void
print_package (pkg_t *pkg)
{
+ char *v = pkg_version_str_alloc(pkg);
printf (
"Name: %s\n"
"Version: %s\n"
@@ -70,14 +71,14 @@ print_package (pkg_t *pkg)
"Size: %ld\n"
"Status: %d\n",
pkg->name,
- pkg->version,
+ v,
pkg->src->name,
pkg->architecture,
pkg->description,
- pkg->tags,
+ pkg->tags? pkg->tags : "",
pkg->size,
- pkg->state_status
- );
+ pkg->state_status);
+ free(v);
}