load: Check for integer and real overlfows and underflows
[jansson.git] / test / testdata / invalid
1 ==== empty ====
2 ====
3 1
4 '[' or '{' expected near end of file
5 ==== null ====
6 null
7 ====
8 1
9 '[' or '{' expected near 'null'
10 ==== lone-open-brace ====
11 {
12 ====
13 2
14 string or '}' expected near end of file
15 ==== lone-open-bracket ====
16 [
17 ====
18 2
19 ']' expected near end of file
20 ==== bracket-comma ====
21 [,
22 ====
23 1
24 unexpected token near ','
25 ==== bracket-one-comma ====
26 [1,
27 ====
28 2
29 ']' expected near end of file
30 ==== unterminated-string ====
31 ["a
32 ====
33 1
34 unexpected newline near '"a'
35 ==== unterminated-array ====
36 ["a"
37 ====
38 2
39 ']' expected near end of file
40 ==== apostrophe ====
41 ['
42 ====
43 1
44 invalid token near '''
45 ==== brace-comma ====
46 {,
47 ====
48 1
49 string or '}' expected near ','
50 ==== unterminated-empty-key ====
51 {"
52 ====
53 1
54 unexpected newline near '"'
55 ==== unterminated-key ====
56 {"a
57 ====
58 1
59 unexpected newline near '"a'
60 ==== object-no-colon ====
61 {"a"
62 ====
63 2
64 ':' expected near end of file
65 ==== object-apostrophes ====
66 {'a'
67 ====
68 1
69 string or '}' expected near '''
70 ==== object-no-value ====
71 {"a":
72 ====
73 2
74 unexpected token near end of file
75 ==== object-unterminated-value ====
76 {"a":"a
77 ====
78 1
79 unexpected newline near '"a'
80 ==== object-garbage-at-end ====
81 {"a":"a" 123}
82 ====
83 1
84 '}' expected near '123'
85 ==== unterminated-object-and-array ====
86 {[
87 ====
88 1
89 string or '}' expected near '['
90 ==== unterminated-array-and-object ====
91 [{
92 ====
93 2
94 string or '}' expected near end of file
95 ==== object-in-unterminated-array ====
96 [{}
97 ====
98 2
99 ']' expected near end of file
100 ==== extra-comma-in-array ====
101 [1,]
102 ====
103 1
104 unexpected token near ']'
105 ==== extra-command-in-multiline-array ====
106 [1,
107 2,
108 3,
109 4,
110 5,
111 ]
112 ====
113 6
114 unexpected token near ']'
115 ==== real-truncated-at-point ====
116 [1.]
117 ====
118 1
119 invalid token near '1.'
120 ==== real-truncated-at-e ====
121 [1e]
122 ====
123 1
124 invalid token near '1e'
125 ==== real-garbage-after-e ====
126 [1ea]
127 ====
128 1
129 invalid token near '1e'
130 ==== real-positive-overflow ====
131 [123123e100000]
132 ====
133 1
134 real number overflow near '123123e100000'
135 ==== real-negative-overflow ====
136 [-123123e100000]
137 ====
138 1
139 real number overflow near '-123123e100000'
140 ==== real-underflow ====
141 [123e-10000000]
142 ====
143 1
144 real number underflow near '123e-10000000'
145 ==== integer-starting-with-zero ====
146 [012]
147 ====
148 1
149 invalid token near '0'
150 ==== negative-integer-starting-with-zero ====
151 [-012]
152 ====
153 1
154 invalid token near '-0'
155 ==== too-big-positive-integer ====
156 [123123123123123]
157 ====
158 1
159 too big integer near '123123123123123'
160 ==== too-big-negative-integer ====
161 [-123123123123123]
162 ====
163 1
164 too big negative integer near '-123123123123123'
165 ==== invalid-identifier ====
166 [troo
167 ====
168 1
169 invalid token near 'troo'
170 ==== invalid-escap ====
171 ["\a <-- invalid escape"]
172 ====
173 1
174 invalid escape near '"\'
175 ==== tab-character-in-string ====
176 ["       <-- tab character"]
177 ====
178 1
179 control character 0x9 near '"'
180 ==== null-byte-in-string ====
181 ["\u0000 (null byte not allowed)"]
182 ====
183 1
184 \u0000 is not allowed
185 ==== truncated-unicode-surrogate ====
186 ["\uDADA (first surrogate without the second)"]
187 ====
188 1
189 invalid Unicode '\uDADA'
190 ==== invalid-second-surrogate ====
191 ["\uD888\u3210 (first surrogate and invalid second surrogate)"]
192 ====
193 1
194 invalid Unicode '\uD888\u3210'
195 ==== lone-second-surrogate ====
196 ["\uDFAA (second surrogate on it's own)"]
197 ====
198 1
199 invalid Unicode '\uDFAA'
200 ==== unicode-identifier ====
201 å
202 ====
203 1
204 '[' or '{' expected near 'å'
205 ==== ascii-unicode-identifier ====
206
207 ====
208 1
209 '[' or '{' expected near 'a'
210 ==== garbage-at-the-end ====
211 [1,2,3]foo
212 ====
213 1
214 end of file expected near 'foo'
215 ==== garbage-after-newline ====
216 [1,2,3]
217 foo
218 ====
219 2
220 end of file expected near 'foo'