aboutsummaryrefslogtreecommitdiff
path: root/tests/gcffmt.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-05-16 12:50:19 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2011-05-16 12:50:19 +0300
commit50e703a9a92e755f928699b705612cd4153ffb9f (patch)
tree4f1b4620217e1213d807631ceecf3a46efc30768 /tests/gcffmt.c
parentaa31497d9f0a3e96801d3752dd2d8f4ea20a2f4c (diff)
downloadgrecs-50e703a9a92e755f928699b705612cd4153ffb9f.tar.gz
grecs-50e703a9a92e755f928699b705612cd4153ffb9f.tar.bz2
Add tests for MeTA1 and Git parsers.
* src/git-parser.c: Hanlde end-of-line comments. * tests/Makefile.am (EXTRA_DIST): Add meta1.conf and git.conf (TESTSUITE_AT): Add parser-git.at and parser-meta1.at. * tests/testsuite.at: Include parser-git.at and parser-meta1.at. * tests/meta1.conf: New file. * tests/git.conf: New file. * tests/parser-git.at: New file. * tests/parser-meta1.at: New file. * tests/gcffmt.c (main): Handle -type= option.
Diffstat (limited to 'tests/gcffmt.c')
-rw-r--r--tests/gcffmt.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/gcffmt.c b/tests/gcffmt.c
index b4a4ece..51e3037 100644
--- a/tests/gcffmt.c
+++ b/tests/gcffmt.c
@@ -28,3 +28,3 @@ usage(const char *arg, FILE *fp, int code)
28 "usage: %s [-h] [-locus] [-delim=char] [-reduce] [-sort] " 28 "usage: %s [-h] [-locus] [-delim=char] [-reduce] [-sort] "
29 "file [file...]\n", 29 "[-type=grecs|bind|meta1|git] file [file...]\n",
30 arg); 30 arg);
@@ -61,3 +61,14 @@ main(int argc, char **argv)
61 usage(progname, stdout, 0); 61 usage(progname, stdout, 0);
62 else if (arg[0] == '-') 62 else if (strncmp(arg, "-type=", 6) == 0) {
63 if (strcasecmp(arg+6, "GRECS") == 0)
64 grecs_parser_fun = grecs_grecs_parser;
65 else if (strcasecmp(arg+6, "META1") == 0)
66 grecs_parser_fun = grecs_meta1_parser;
67 else if (strcasecmp(arg+6, "BIND") == 0)
68 grecs_parser_fun = grecs_bind_parser;
69 else if (strcasecmp(arg+6, "GIT") == 0)
70 grecs_parser_fun = grecs_git_parser;
71 else
72 usage(progname, stderr, 1);
73 } else if (arg[0] == '-')
63 usage(progname, stderr, 1); 74 usage(progname, stderr, 1);

Return to:

Send suggestions and report system problems to the System administrator.