]> git.ozlabs.org Git - ccan/blobdiff - ccan/strgrp/test/api_test_print.c
strgrp: new module
[ccan] / ccan / strgrp / test / api_test_print.c
diff --git a/ccan/strgrp/test/api_test_print.c b/ccan/strgrp/test/api_test_print.c
new file mode 100644 (file)
index 0000000..8635882
--- /dev/null
@@ -0,0 +1,15 @@
+#include "../test/helpers.h"
+
+int main(void) {
+    struct strgrp *ctx;
+
+    plan_tests(1);
+    create(ctx, DEFAULT_SIMILARITY);
+    strgrp_add(ctx, "a", (void *)"1");
+    strgrp_add(ctx, "a", (void *)"2");
+    strgrp_add(ctx, "b", (void *)"3");
+    strgrp_print(ctx);
+    strgrp_free(ctx);
+    pass("No errors");
+    return exit_status();
+}