Changeset 13623
- Timestamp:
- Nov 27, 2012, 11:21:13 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/json-test.c
r13613 r13623 194 194 } 195 195 196 static int 197 test_unescape (void) 198 { 199 const char * in = "{ \"string-1\": \"\\/usr\\/lib\" }"; 200 tr_benc top; 201 const char * str; 202 203 const int err = tr_jsonParse (NULL, in, strlen(in), &top, NULL); 204 check_int_eq (0, err); 205 check (tr_bencDictFindStr (&top, "string-1", &str)); 206 check_streq ("/usr/lib", str); 207 208 tr_bencFree (&top); 209 return 0; 210 } 211 196 212 int 197 213 main( void ) … … 201 217 test1, 202 218 test2, 203 test3, }; 219 test3, 220 test_unescape }; 204 221 205 222 return runTests(tests, NUM_TESTS(tests));
Note: See TracChangeset
for help on using the changeset viewer.