comparison src/json_test.c @ 13353:8412df1479a3 v8.0.1550

patch 8.0.1550: various small problems in source files commit https://github.com/vim/vim/commit/792f0e36593d1ec13ccb8a622ca5542c500577b4 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Feb 27 17:27:13 2018 +0100 patch 8.0.1550: various small problems in source files Problem: Various small problems in source files. Solution: Fix the problems.
author Christian Brabandt <cb@256bit.org>
date Tue, 27 Feb 2018 17:30:08 +0100
parents bb4360d64eb2
children f41b55f9357c
comparison
equal deleted inserted replaced
13352:764ce635fdc7 13353:8412df1479a3
160 js_read_T reader; 160 js_read_T reader;
161 161
162 reader.js_fill = fill_from_cookie; 162 reader.js_fill = fill_from_cookie;
163 reader.js_used = 0; 163 reader.js_used = 0;
164 reader.js_buf = (char_u *)" [ \"a\" , 123 "; 164 reader.js_buf = (char_u *)" [ \"a\" , 123 ";
165 reader.js_cookie = " [ \"a\" , 123 ] "; 165 reader.js_cookie = " [ \"a\" , 123 ] ";
166 assert(json_find_end(&reader, 0) == OK); 166 assert(json_find_end(&reader, 0) == OK);
167 reader.js_buf = (char_u *)" [ \"a\" , "; 167 reader.js_buf = (char_u *)" [ \"a\" , ";
168 assert(json_find_end(&reader, 0) == OK); 168 assert(json_find_end(&reader, 0) == OK);
169 reader.js_buf = (char_u *)" [ \"a\" "; 169 reader.js_buf = (char_u *)" [ \"a\" ";
170 assert(json_find_end(&reader, 0) == OK); 170 assert(json_find_end(&reader, 0) == OK);
184 184
185 reader.js_fill = fill_from_cookie; 185 reader.js_fill = fill_from_cookie;
186 reader.js_used = 0; 186 reader.js_used = 0;
187 reader.js_buf = (char_u *)" \"foo"; 187 reader.js_buf = (char_u *)" \"foo";
188 reader.js_end = reader.js_buf + STRLEN(reader.js_buf); 188 reader.js_end = reader.js_buf + STRLEN(reader.js_buf);
189 reader.js_cookie = " \"foobar\" "; 189 reader.js_cookie = " \"foobar\" ";
190 assert(json_decode_string(&reader, NULL, '"') == OK); 190 assert(json_decode_string(&reader, NULL, '"') == OK);
191 } 191 }
192 #endif 192 #endif
193 193
194 int 194 int