Enhance test system

- Tests are now named
- Testlogs are preserved between runs
- Tests can be run through Valgrind Memcheck tool
This commit is contained in:
Petri Lehtinen
2009-07-26 22:44:11 +03:00
parent d3b3055a34
commit f60c563bab
9 changed files with 170 additions and 137 deletions

69
test/testdata/invalid vendored
View File

@@ -1,107 +1,108 @@
==== empty ====
====
1
'[' or '{' expected near end of file
========
==== null ====
null
====
1
'[' or '{' expected near 'null'
========
==== lone-open-brace ====
{
====
2
string or '}' expected near end of file
========
==== lone-open-bracket ====
[
====
2
']' expected near end of file
========
==== bracket-comma ====
[,
====
1
unexpected token near ','
========
==== bracket-one-comma ====
[1,
====
2
']' expected near end of file
========
==== unterminated-string ====
["a
====
1
unexpected newline near '"a'
========
==== unterminated-array ====
["a"
====
2
']' expected near end of file
========
==== apostrophe ====
['
====
1
invalid token near '''
========
==== brace-comma ====
{,
====
1
string or '}' expected near ','
========
==== unterminated-empty-key ====
{"
====
1
unexpected newline near '"'
========
==== unterminated-key ====
{"a
====
1
unexpected newline near '"a'
========
==== object-no-colon ====
{"a"
====
2
':' expected near end of file
========
==== object-apostrophes ====
{'a'
====
1
string or '}' expected near '''
========
==== object-no-value ====
{"a":
====
2
unexpected token near end of file
========
==== object-unterminated-value ====
{"a":"a
====
1
unexpected newline near '"a'
========
==== object-garbage-at-end ====
{"a":"a" 123}
====
1
'}' expected near '123'
========
==== unterminated-object-and-array ====
{[
====
1
string or '}' expected near '['
========
==== unterminated-array-and-object ====
[{
====
2
string or '}' expected near end of file
========
==== object-in-unterminated-array ====
[{}
====
2
']' expected near end of file
========
==== extra-comma-in-array ====
[1,]
====
1
unexpected token near ']'
========
==== extra-command-in-multiline-array ====
[1,
2,
3,
@@ -111,67 +112,67 @@ unexpected token near ']'
====
6
unexpected token near ']'
========
==== real-truncated-at-point ====
[1.]
====
1
invalid token near '1.'
========
==== real-truncated-at-e ====
[1e]
====
1
invalid token near '1e'
========
==== real-garbage-after-e ====
[1ea]
====
1
invalid token near '1e'
========
==== integer-starting-with-zero ====
[012]
====
1
invalid token near '0'
========
==== negative-integer-starting-with-zero ====
[-012]
====
1
invalid token near '-0'
========
==== invalid-identifier ====
[troo
====
1
invalid token near 'troo'
========
==== invalid-escap ====
["\a <-- invalid escape"]
====
1
invalid escape near '"\'
========
==== tab-character-in-string ====
[" <-- tab character"]
====
1
control character 0x9 near '"'
========
==== null-byte-in-string ====
["\u0000 (null byte not allowed)"]
====
1
\u0000 is not allowed
========
==== truncated-unicode-surrogate ====
["\uDADA (first surrogate without the second)"]
====
1
invalid Unicode '\uDADA'
========
==== invalid-second-surrogate ====
["\uD888\u3210 (first surrogate and invalid second surrogate)"]
====
1
invalid Unicode '\uD888\u3210'
========
==== lone-second-surrogate ====
["\uDFAA (second surrogate on it's own)"]
====
1
invalid Unicode '\uDFAA'
========
==== unicode-identifier ====
å
====
1