summaryrefslogtreecommitdiff
path: root/test/config_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/config_test.c')
-rw-r--r--test/config_test.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/config_test.c b/test/config_test.c
new file mode 100644
index 00000000000..13702342153
--- /dev/null
+++ b/test/config_test.c
@@ -0,0 +1,21 @@
+#include <wt_int.h>
+
+#include <string.h>
+
+int main(int argc, char *argv[])
+{
+ int ret;
+ WT_CONFIG c;
+ WT_CONFIG_ITEM k, v;
+ const char *cstr = "create,cachesize=10MB";
+
+ config_init(&c, cstr, strlen(cstr));
+ while ((ret = config_next(&c, &k, &v)) == 0) {
+ printf("Got key '%.*s', value '%.*s'\n",
+ (int)k.len, k.str, (int)v.len, v.str);
+ }
+
+ printf("Last call to config_next failed with %d\n", ret);
+
+ return (0);
+}