summaryrefslogtreecommitdiff
path: root/test/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/parse.c')
-rw-r--r--test/parse.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/test/parse.c b/test/parse.c
deleted file mode 100644
index 9fca97b..0000000
--- a/test/parse.c
+++ /dev/null
@@ -1,25 +0,0 @@
-#include "nslog/nslog.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-
-int main(int argc, char **argv)
-{
- if (argc != 2) {
- fprintf(stderr, "usage: parse 'filtertext'\n");
- return 1;
- }
- nslog_filter_t *filt;
- nslog_error err;
-
- err = nslog_filter_from_text(argv[1], &filt);
- if (err != NSLOG_NO_ERROR) {
- fprintf(stderr, "Unable to parse.\n");
- return 2;
- }
- char *ct = nslog_filter_sprintf(filt);
- filt = nslog_filter_unref(filt);
- printf("%s\n", ct);
- free(ct);
- return 0;
-}