summaryrefslogtreecommitdiff
path: root/test/tokeniser2.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2008-06-18 09:08:30 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2008-06-18 09:08:30 +0000
commit905ae5c4c703400fc2f0bfd9bf4e75d490de7ad6 (patch)
treeefb079637c743f2d919e4142c9587b2a6f8a931b /test/tokeniser2.c
parent96b235849d8ea35827bc99cd8c2fc94108e4d4d5 (diff)
downloadlibhubbub-905ae5c4c703400fc2f0bfd9bf4e75d490de7ad6.tar.gz
libhubbub-905ae5c4c703400fc2f0bfd9bf4e75d490de7ad6.tar.bz2
Print out expected string, too, so we can see where json-c is failing to decode surrogates correctly.
svn path=/trunk/hubbub/; revision=4380
Diffstat (limited to 'test/tokeniser2.c')
-rw-r--r--test/tokeniser2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/tokeniser2.c b/test/tokeniser2.c
index e56df33..e1f42f8 100644
--- a/test/tokeniser2.c
+++ b/test/tokeniser2.c
@@ -430,7 +430,9 @@ void token_handler(const hubbub_token *token, void *pw)
size_t len = min(token->data.character.len,
strlen(expstr + ctx->char_off));
- printf("'%.*s'\n", (int) token->data.character.len, gotstr);
+ printf("expected: '%s'\n", expstr + ctx->char_off);
+ printf(" got: '%.*s'\n",
+ (int) token->data.character.len, gotstr);
assert(strncmp(gotstr, expstr + ctx->char_off, len) == 0);