This commit is contained in:
2025-11-24 14:19:51 +05:30
commit f5c1412b28
6734 changed files with 1527575 additions and 0 deletions

View File

@ -0,0 +1,2 @@
1 2 2
invalid token near '''

View File

@ -0,0 +1,2 @@
1 1 1
'[' or '{' expected near 'a'

View File

@ -0,0 +1,2 @@
1 2 2
string or '}' expected near ','

View File

@ -0,0 +1,2 @@
1 2 2
unexpected token near ','

View File

@ -0,0 +1,2 @@
2 0 4
']' expected near end of file

View File

@ -0,0 +1,2 @@
1 3 3
']' expected near end of file

View File

@ -0,0 +1,2 @@
1 0 0
'[' or '{' expected near end of file

View File

@ -0,0 +1,2 @@
1 33 33
\u0000 is not allowed

View File

@ -0,0 +1 @@
["\u0000 (null byte not allowed)"]

View File

@ -0,0 +1,2 @@
1 4 4
unexpected token near ']'

View File

@ -0,0 +1,2 @@
6 1 17
unexpected token near ']'

View File

@ -0,0 +1,6 @@
[1,
2,
3,
4,
5,
]

View File

@ -0,0 +1,2 @@
2 3 11
end of file expected near 'foo'

View File

@ -0,0 +1,2 @@
[1,2,3]
foo

View File

@ -0,0 +1,2 @@
1 10 10
end of file expected near 'foo'

View File

@ -0,0 +1 @@
[1,2,3]foo

View File

@ -0,0 +1,2 @@
1 2 2
invalid token near '0'

View File

@ -0,0 +1,2 @@
1 4 4
invalid escape near '"\a'

View File

@ -0,0 +1 @@
["\a <-- invalid escape"]

View File

@ -0,0 +1,2 @@
1 5 5
invalid token near 'troo'

View File

@ -0,0 +1,2 @@
1 8 8
']' expected near 'foo'

View File

@ -0,0 +1,2 @@
1 12 12
']' expected near 'foo'

View File

@ -0,0 +1 @@
[-123.123foo]

View File

@ -0,0 +1,2 @@
1 62 62
invalid Unicode '\uD888\u3210'

View File

@ -0,0 +1 @@
["\uD888\u3210 (first surrogate and invalid second surrogate)"]

View File

@ -0,0 +1,2 @@
2 0 2
string or '}' expected near end of file

View File

@ -0,0 +1,2 @@
1 1 1
string or '}' expected near end of file

View File

@ -0,0 +1,2 @@
2 0 2
']' expected near end of file

View File

@ -0,0 +1,2 @@
1 1 1
']' expected near end of file

View File

@ -0,0 +1,2 @@
1 40 40
invalid Unicode '\uDFAA'

View File

@ -0,0 +1 @@
["\uDFAA (second surrogate on it's own)"]

View File

@ -0,0 +1,2 @@
1 2 2
invalid token near '-'

View File

@ -0,0 +1,2 @@
1 3 3
invalid token near '-0'

View File

@ -0,0 +1,2 @@
1 12 12
control character 0x0 near '"null byte '

View File

@ -0,0 +1,2 @@
The embedded NULL byte breaks json_loads(), which is used instead of
json_loadf() in the stripped tests.

View File

@ -0,0 +1,2 @@
1 2 2
invalid token near end of file

View File

@ -0,0 +1,2 @@
The embedded NULL byte breaks json_loads(), which is used instead of
json_loadf() in the stripped tests.

View File

@ -0,0 +1,2 @@
1 4 4
'[' or '{' expected near 'null'

View File

@ -0,0 +1 @@
null

View File

@ -0,0 +1,2 @@
1 2 2
string or '}' expected near '''

View File

@ -0,0 +1,2 @@
1 12 12
'}' expected near '123'

View File

@ -0,0 +1 @@
{"a":"a" 123}

View File

@ -0,0 +1,2 @@
2 0 4
']' expected near end of file

View File

@ -0,0 +1,2 @@
1 3 3
']' expected near end of file

View File

@ -0,0 +1,2 @@
2 0 5
':' expected near end of file

View File

@ -0,0 +1,2 @@
1 4 4
':' expected near end of file

View File

@ -0,0 +1,2 @@
2 0 6
unexpected token near end of file

View File

@ -0,0 +1,2 @@
1 5 5
unexpected token near end of file

View File

@ -0,0 +1,2 @@
1 7 7
unexpected newline near '"a'

View File

@ -0,0 +1,2 @@
1 7 7
premature end of input near '"a'

View File

@ -0,0 +1,2 @@
1 3 3
invalid token near '1e'

View File

@ -0,0 +1,2 @@
1 15 15
real number overflow near '-123123e100000'

View File

@ -0,0 +1 @@
[-123123e100000]

View File

@ -0,0 +1,2 @@
1 14 14
real number overflow near '123123e100000'

View File

@ -0,0 +1 @@
[123123e100000]

View File

@ -0,0 +1,2 @@
1 3 3
invalid token near '1e'

View File

@ -0,0 +1,2 @@
1 3 3
invalid token near '1.'

View File

@ -0,0 +1,57 @@
#!/bin/sh
#
# Copyright (c) 2009-2012 Petri Lehtinen <petri@digip.org>
#
# Jansson is free software; you can redistribute it and/or modify
# it under the terms of the MIT license. See LICENSE for details.
is_test() {
test -d $test_path
}
do_run() {
variant=$1
s=".$1"
strip=0
if [ "$variant" = "strip" ]; then
# This test should not be stripped
[ -f $test_path/nostrip ] && return
strip=1
fi
STRIP=$strip $json_process \
<$test_path/input >$test_log/stdout$s 2>$test_log/stderr$s
valgrind_check $test_log/stderr$s || return 1
ref=error
[ -f $test_path/error$s ] && ref=error$s
if ! cmp -s $test_path/$ref $test_log/stderr$s; then
echo $variant > $test_log/variant
return 1
fi
}
run_test() {
do_run normal && do_run strip
}
show_error() {
valgrind_show_error && return
read variant < $test_log/variant
s=".$variant"
echo "VARIANT: $variant"
echo "EXPECTED ERROR:"
ref=error
[ -f $test_path/error$s ] && ref=error$s
nl -bn $test_path/$ref
echo "ACTUAL ERROR:"
nl -bn $test_log/stderr$s
}
. $top_srcdir/test/scripts/run-tests.sh

View File

@ -0,0 +1,2 @@
1 2 2
control character 0x9 near '"'

View File

@ -0,0 +1 @@
[" <-- tab character"]

View File

@ -0,0 +1,2 @@
1 32 32
too big negative integer

View File

@ -0,0 +1 @@
[-123123123123123123123123123123]

View File

@ -0,0 +1,2 @@
1 31 31
too big integer

View File

@ -0,0 +1 @@
[123123123123123123123123123123]

View File

@ -0,0 +1,2 @@
1 46 46
invalid Unicode '\uDADA'

View File

@ -0,0 +1 @@
["\uDADA (first surrogate without the second)"]

View File

@ -0,0 +1,2 @@
1 1 2
'[' or '{' expected near 'å'

View File

@ -0,0 +1,2 @@
2 0 3
string or '}' expected near end of file

View File

@ -0,0 +1,2 @@
1 2 2
string or '}' expected near end of file

View File

@ -0,0 +1,2 @@
2 0 5
']' expected near end of file

View File

@ -0,0 +1,2 @@
1 4 4
']' expected near end of file

View File

@ -0,0 +1,2 @@
1 2 2
unexpected newline near '"'

View File

@ -0,0 +1,2 @@
1 2 2
premature end of input near '"'

Some files were not shown because too many files have changed in this diff Show More