summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorgraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-12-11 01:07:49 (EST)
committer graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-12-11 01:07:49 (EST)
commitb9f63a0992591fb76cb50e898579ad5718c7ef92 (patch)
treeb214782966a8c7a86c64b2278d7164c1cd5b3d49 /tests
parent9e86f112d4c97d836eeaa59fce947f438ce77817 (diff)
Print full version, not just pkg->version.
git-svn-id: http://opkg.googlecode.com/svn/trunk@489 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
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);
}