Add stripped unit tests for decoder
authorPetri Lehtinen <petri@digip.org>
Tue, 8 Sep 2009 13:32:47 +0000 (16:32 +0300)
committerPetri Lehtinen <petri@digip.org>
Tue, 8 Sep 2009 14:03:01 +0000 (17:03 +0300)
commit04d550b02e8eadc0c9fb1966fe42fe9fc25f89e0
tree980cac6c36c3b1f40a69ff36727fb35e1f302216
parent55d25665395551e711fa7d971cf76c8acf0b17f1
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.
test/run-test
test/split-testfile.py
test/test-invalid
test/test-valid
test/testdata/invalid-strip [new file with mode: 0644]
test/testdata/valid-strip [new file with mode: 0644]