| ... | @@ -431,15 +431,11 @@ test "y_string_two-byte-utf-8" { | ... | @@ -431,15 +431,11 @@ test "y_string_two-byte-utf-8" { |
| 431 | } | 431 | } |
| 432 | | 432 | |
| 433 | test "y_string_u+2028_line_sep" { | 433 | test "y_string_u+2028_line_sep" { |
| 434 | ok( | 434 | ok("[\"\xe2\x80\xa8\"]"); |
| 435 | \\["
"] | | |
| 436 | ); | | |
| 437 | } | 435 | } |
| 438 | | 436 | |
| 439 | test "y_string_u+2029_par_sep" { | 437 | test "y_string_u+2029_par_sep" { |
| 440 | ok( | 438 | ok("[\"\xe2\x80\xa9\"]"); |
| 441 | \\["
"] | | |
| 442 | ); | | |
| 443 | } | 439 | } |
| 444 | | 440 | |
| 445 | test "y_string_uescaped_newline" { | 441 | test "y_string_uescaped_newline" { |
| ... | @@ -455,9 +451,7 @@ test "y_string_uEscape" { | ... | @@ -455,9 +451,7 @@ test "y_string_uEscape" { |
| 455 | } | 451 | } |
| 456 | | 452 | |
| 457 | test "y_string_unescaped_char_delete" { | 453 | test "y_string_unescaped_char_delete" { |
| 458 | ok( | 454 | ok("[\"\x7f\"]"); |
| 459 | \\[""] | | |
| 460 | ); | | |
| 461 | } | 455 | } |
| 462 | | 456 | |
| 463 | test "y_string_unicode_2" { | 457 | test "y_string_unicode_2" { |
| ... | @@ -527,9 +521,7 @@ test "y_string_utf8" { | ... | @@ -527,9 +521,7 @@ test "y_string_utf8" { |
| 527 | } | 521 | } |
| 528 | | 522 | |
| 529 | test "y_string_with_del_character" { | 523 | test "y_string_with_del_character" { |
| 530 | ok( | 524 | ok("[\"a\x7fa\"]"); |
| 531 | \\["aa"] | | |
| 532 | ); | | |
| 533 | } | 525 | } |
| 534 | | 526 | |
| 535 | test "y_structure_lonely_false" { | 527 | test "y_structure_lonely_false" { |
| ... | @@ -718,9 +710,7 @@ test "n_array_number_and_several_commas" { | ... | @@ -718,9 +710,7 @@ test "n_array_number_and_several_commas" { |
| 718 | } | 710 | } |
| 719 | | 711 | |
| 720 | test "n_array_spaces_vertical_tab_formfeed" { | 712 | test "n_array_spaces_vertical_tab_formfeed" { |
| 721 | err( | 713 | err("[\"\x0aa\"\\f]"); |
| 722 | \\["a"\f] | | |
| 723 | ); | | |
| 724 | } | 714 | } |
| 725 | | 715 | |
| 726 | test "n_array_star_inside" { | 716 | test "n_array_star_inside" { |
| ... | @@ -774,9 +764,7 @@ test "n_incomplete_true" { | ... | @@ -774,9 +764,7 @@ test "n_incomplete_true" { |
| 774 | } | 764 | } |
| 775 | | 765 | |
| 776 | test "n_multidigit_number_then_00" { | 766 | test "n_multidigit_number_then_00" { |
| 777 | err( | 767 | err("123\x00"); |
| 778 | \\123 | | |
| 779 | ); | | |
| 780 | } | 768 | } |
| 781 | | 769 | |
| 782 | test "n_number_0.1.2" { | 770 | test "n_number_0.1.2" { |
| ... | @@ -1309,9 +1297,7 @@ test "n_string_escaped_ctrl_char_tab" { | ... | @@ -1309,9 +1297,7 @@ test "n_string_escaped_ctrl_char_tab" { |
| 1309 | } | 1297 | } |
| 1310 | | 1298 | |
| 1311 | test "n_string_escaped_emoji" { | 1299 | test "n_string_escaped_emoji" { |
| 1312 | err( | 1300 | err("[\"\x5c\xc3\xb0\xc2\x9f\xc2\x8c\xc2\x80\"]"); |
| 1313 | \\["\ð"] | | |
| 1314 | ); | | |
| 1315 | } | 1301 | } |
| 1316 | | 1302 | |
| 1317 | test "n_string_escape_x" { | 1303 | test "n_string_escape_x" { |
| ... | @@ -1357,9 +1343,7 @@ test "n_string_invalid_unicode_escape" { | ... | @@ -1357,9 +1343,7 @@ test "n_string_invalid_unicode_escape" { |
| 1357 | } | 1343 | } |
| 1358 | | 1344 | |
| 1359 | test "n_string_invalid_utf8_after_escape" { | 1345 | test "n_string_invalid_utf8_after_escape" { |
| 1360 | err( | 1346 | err("[\"\\\x75\xc3\xa5\"]"); |
| 1361 | \\["\å"] | | |
| 1362 | ); | | |
| 1363 | } | 1347 | } |
| 1364 | | 1348 | |
| 1365 | test "n_string_invalid-utf-8-in-escape" { | 1349 | test "n_string_invalid-utf-8-in-escape" { |
| ... | @@ -1405,9 +1389,7 @@ test "n_string_start_escape_unclosed" { | ... | @@ -1405,9 +1389,7 @@ test "n_string_start_escape_unclosed" { |
| 1405 | } | 1389 | } |
| 1406 | | 1390 | |
| 1407 | test "n_string_unescaped_crtl_char" { | 1391 | test "n_string_unescaped_crtl_char" { |
| 1408 | err( | 1392 | err("[\"a\x00a\"]"); |
| 1409 | \\["a a"] | | |
| 1410 | ); | | |
| 1411 | } | 1393 | } |
| 1412 | | 1394 | |
| 1413 | test "n_string_unescaped_newline" { | 1395 | test "n_string_unescaped_newline" { |
| ... | @@ -1418,9 +1400,7 @@ test "n_string_unescaped_newline" { | ... | @@ -1418,9 +1400,7 @@ test "n_string_unescaped_newline" { |
| 1418 | } | 1400 | } |
| 1419 | | 1401 | |
| 1420 | test "n_string_unescaped_tab" { | 1402 | test "n_string_unescaped_tab" { |
| 1421 | err( | 1403 | err("[\"\t\"]"); |
| 1422 | \\["	"] | | |
| 1423 | ); | | |
| 1424 | } | 1404 | } |
| 1425 | | 1405 | |
| 1426 | test "n_string_unicode_CapitalU" { | 1406 | test "n_string_unicode_CapitalU" { |
| ... | @@ -1532,9 +1512,7 @@ test "n_structure_no_data" { | ... | @@ -1532,9 +1512,7 @@ test "n_structure_no_data" { |
| 1532 | } | 1512 | } |
| 1533 | | 1513 | |
| 1534 | test "n_structure_null-byte-outside-string" { | 1514 | test "n_structure_null-byte-outside-string" { |
| 1535 | err( | 1515 | err("[\x00]"); |
| 1536 | \\[ ] | | |
| 1537 | ); | | |
| 1538 | } | 1516 | } |
| 1539 | | 1517 | |
| 1540 | test "n_structure_number_with_trailing_garbage" { | 1518 | test "n_structure_number_with_trailing_garbage" { |
| ... | @@ -1718,9 +1696,7 @@ test "n_structure_UTF8_BOM_no_data" { | ... | @@ -1718,9 +1696,7 @@ test "n_structure_UTF8_BOM_no_data" { |
| 1718 | } | 1696 | } |
| 1719 | | 1697 | |
| 1720 | test "n_structure_whitespace_formfeed" { | 1698 | test "n_structure_whitespace_formfeed" { |
| 1721 | err( | 1699 | err("[\x0c]"); |
| 1722 | \\[] | | |
| 1723 | ); | | |
| 1724 | } | 1700 | } |
| 1725 | | 1701 | |
| 1726 | test "n_structure_whitespace_U+2060_word_joiner" { | 1702 | test "n_structure_whitespace_U+2060_word_joiner" { |
| ... | @@ -1900,21 +1876,15 @@ test "i_string_truncated-utf-8" { | ... | @@ -1900,21 +1876,15 @@ test "i_string_truncated-utf-8" { |
| 1900 | } | 1876 | } |
| 1901 | | 1877 | |
| 1902 | test "i_string_utf16BE_no_BOM" { | 1878 | test "i_string_utf16BE_no_BOM" { |
| 1903 | any( | 1879 | any("\x00\x5b\x00\x22\x00\xc3\xa9\x00\x22\x00\x5d"); |
| 1904 | \\ [ " é |