summaryrefslogtreecommitdiff
path: root/test.c
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2016-08-28 01:20:44 -0400
committerPaul Duncan <pabs@pablotron.org>2016-08-28 01:20:44 -0400
commit1367fe1bafa1b877f4f92361294eab3a1dd3c11c (patch)
tree46ed75be5dcd420f6151888275a42176bd29b45e /test.c
parent56b49c7258f6c597da56ac615c7387b655485c47 (diff)
downloadlibfhp-1367fe1bafa1b877f4f92361294eab3a1dd3c11c.tar.bz2
libfhp-1367fe1bafa1b877f4f92361294eab3a1dd3c11c.zip
fix te-parser.c
Diffstat (limited to 'test.c')
-rw-r--r--test.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/test.c b/test.c
index a371bc6..b1ca674 100644
--- a/test.c
+++ b/test.c
@@ -151,6 +151,7 @@ test_percent(void) {
static char *
te_parser_tests[] = {
+ " ",
"gzip",
"deflate",
"gzip,deflate,chunked",
@@ -168,6 +169,8 @@ test_te_parser(void) {
// get test string
char * const s = te_parser_tests[i];
+ fprintf(stderr, "te testing: \"%s\"\n", s);
+
// init parser
fhp_te_parser_t p;
fhp_te_parser_init(&p);
@@ -178,11 +181,12 @@ test_te_parser(void) {
}
// finish parsing
- if ((err = fhp_te_parser_done(&p)) != FHP_OK) {
+ size_t num_tes;
+ if ((err = fhp_te_parser_done(&p, &num_tes)) != FHP_OK) {
die("test_te_parser", "fhp_te_parser_push", err);
}
- fprintf(stderr, "te test: \"%s\", p->num_tes = %lu\n", s, p.num_tes);
+ fprintf(stderr, "te test: \"%s\", num_tes = %lu\n", s, num_tes);
}
}