| 864 | } |
| 865 | |
| 866 | static void numeric_entities(test_batch_runner *runner) { |
| 867 | test_md_to_html(runner, "�", "<p>" UTF8_REPL "</p>\n", |
| 868 | "Invalid numeric entity 0"); |
| 869 | test_md_to_html(runner, "퟿", "<p>\xED\x9F\xBF</p>\n", |
| 870 | "Valid numeric entity 0xD7FF"); |
| 871 | test_md_to_html(runner, "�", "<p>" UTF8_REPL "</p>\n", |
| 872 | "Invalid numeric entity 0xD800"); |
| 873 | test_md_to_html(runner, "�", "<p>" UTF8_REPL "</p>\n", |
| 874 | "Invalid numeric entity 0xDFFF"); |
| 875 | test_md_to_html(runner, "", "<p>\xEE\x80\x80</p>\n", |
| 876 | "Valid numeric entity 0xE000"); |
| 877 | test_md_to_html(runner, "", "<p>\xF4\x8F\xBF\xBF</p>\n", |
| 878 | "Valid numeric entity 0x10FFFF"); |
| 879 | test_md_to_html(runner, "�", "<p>" UTF8_REPL "</p>\n", |
| 880 | "Invalid numeric entity 0x110000"); |
| 881 | test_md_to_html(runner, "�", "<p>&#x80000000;</p>\n", |
| 882 | "Invalid numeric entity 0x80000000"); |
| 883 | test_md_to_html(runner, "�", "<p>&#xFFFFFFFF;</p>\n", |
| 884 | "Invalid numeric entity 0xFFFFFFFF"); |
| 885 | test_md_to_html(runner, "�", "<p>&#99999999;</p>\n", |
| 886 | "Invalid numeric entity 99999999"); |
| 887 | |
| 888 | test_md_to_html(runner, "&#;", "<p>&#;</p>\n", |
| 889 | "Min decimal entity length"); |
| 890 | test_md_to_html(runner, "&#x;", "<p>&#x;</p>\n", |
| 891 | "Min hexadecimal entity length"); |
| 892 | test_md_to_html(runner, "�", "<p>&#999999999;</p>\n", |
| 893 | "Max decimal entity length"); |
| 894 | test_md_to_html(runner, "A", "<p>&#x000000041;</p>\n", |
| 895 | "Max hexadecimal entity length"); |
| 896 | } |
| 897 | |
| 898 | static void test_safe(test_batch_runner *runner) { |
| 899 | // Test safe mode |
no test coverage detected