summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorgraham.gower@gmail.com <graham.gower@gmail.com@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2011-05-25 20:51:50 (EDT)
committer graham.gower@gmail.com <graham.gower@gmail.com@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2011-05-25 20:51:50 (EDT)
commit1e0e1f2f283ffdedb1c0d05c8e572074acf6baa8 (patch)
tree3042bc145819a5d3340a40130f95bffe806dca2e /tests
parent82779432519ebc597fc7b74b4e6313fabd3cb9e0 (diff)
Improve the opkg_{get,set}_option() C API.
This breaks compatibility with the previous API, so bump the lib version. git-svn-id: http://opkg.googlecode.com/svn/trunk@622 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'tests')
-rw-r--r--tests/libopkg_test.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/libopkg_test.c b/tests/libopkg_test.c
index 31a22b0..21f100e 100644
--- a/tests/libopkg_test.c
+++ b/tests/libopkg_test.c
@@ -159,6 +159,18 @@ main (int argc, char **argv)
return 1;
}
+ char *cache;
+ opkg_set_option("cache", "|asdf|");
+ if (opkg_get_option("cache", &cache) != -1) {
+ printf("cache=``%s''\n", cache);
+ }
+
+ int verb;
+ opkg_set_option("verbosity", (void *)3);
+ if (opkg_get_option("verbosity", &verb) != -1) {
+ printf("verbosity=%d\n", verb);
+ }
+
switch (argv[1][0])
{
case 'f':