Add stripped unit tests for decoder

That is, test cases where there's no newline or other whitespace at
the beginning or end of input. This was implemented by adding a
--strip option to split-testfile to strip the input file after writing
it.

The actual test JSON texts are the same as testdata/invalid and
testdata/valid. The expected output of the invalid cases had to be
adjusted a bit: because there's no newline at the end, some of the
line numbers needed to be changed.
This commit is contained in:
Petri Lehtinen
2009-09-08 16:32:47 +03:00
parent 55d2566539
commit 04d550b02e
6 changed files with 287 additions and 7 deletions

View File

@@ -5,7 +5,7 @@
# Jansson is free software; you can redistribute it and/or modify
# it under the terms of the MIT license. See LICENSE for details.
TESTFILES="${srcdir}/testdata/valid"
TESTFILES="${srcdir}/testdata/valid ${srcdir}/testdata/valid-strip"
run_test() {
local prog=$1