From 1e0e1f2f283ffdedb1c0d05c8e572074acf6baa8 Mon Sep 17 00:00:00 2001 From: graham.gower@gmail.com Date: Wed, 25 May 2011 20:51:50 -0400 Subject: 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 --- (limited to 'tests') 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': -- cgit v0.9.1