31 expectAccepted(
"Watermark \xF0\x9F\x8C\x88", StringKind::DisplayText);
34 expectAccepted(
"preset=p7:rc=vbr_hq", StringKind::StructuredValue);
38 validate_string(std::string(
"bad\0path", 8), StringKind::Path,
42 validate_string(
"bad\npath", StringKind::Path,
"test path");
45 validate_string(
"\xC0\xAF", StringKind::Path,
"test path");
48 validate_string(
"bad-name", StringKind::Identifier,
"test identifier");
51 validate_string(
"value;command", StringKind::StructuredValue,
55 validate_string(
"javascript://example", StringKind::Url,
"test URL");
58 validate_string(
"https://example.com/bad path", StringKind::Url,
62 validate_string(
"hidden\xE2\x80\xAEtext", StringKind::DisplayText,
67 throw std::runtime_error(
"UTF-8 truncation split a codepoint");
70 std::istringstream valid_lines(
"\xEF\xBB\xBF"
71 "first\r\nsecond\tvalue\n");
76 throw std::runtime_error(
"bounded line reader rejected a valid line");
80 line !=
"second\tvalue") {
81 throw std::runtime_error(
82 "bounded line reader rejected valid configuration whitespace");
85 std::istringstream long_line(
"123456789\n");
88 long_line, value,
"test input", 1, 8));
91 std::cout <<
"ACMXVK input validation tests passed\n";