Skip to content

Commit

Permalink
Add tests from fuzzer
Browse files Browse the repository at this point in the history
  • Loading branch information
catamorphism committed Dec 9, 2024
1 parent e7453e6 commit e2353bd
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ void TestMessageFormat2::jsonTestsFromFiles(IcuTestErrorCode& errorCode) {
runTestsFromJsonFile(*this, "matches-whitespace.json", errorCode);
runTestsFromJsonFile(*this, "alias-selector-annotations.json", errorCode);
runTestsFromJsonFile(*this, "runtime-errors.json", errorCode);
runTestsFromJsonFile(*this, "more-syntax-errors.json", errorCode);

// Re: the expected output for the first test in this file:
// Note: the more "correct" fallback output seems like it should be "1.000 3" (ignoring the
Expand Down
21 changes: 21 additions & 0 deletions testdata/message2/more-syntax-errors.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://raw.githubusercontent.com/unicode-org/message-format-wg/main/test/schemas/v0/tests.schema.json",
"scenario": "Syntax errors",
"description": "Strings that produce syntax errors when parsed.",
"defaultTestProperties": {
"locale": "en-US",
"expErrors": [
{
"type": "syntax-error"
}
]
},
"tests": [
{
"src": "{\u0000/\u0000g }\u0000\u0000\u0000\u0000\u000c"
},
{
"src": ".\u0000$\u0000.\u0000\u00ca$\u0000\u0000\u00f9\u00f9{\u0000{\u0000{\u0000/\u0000\u00ff$\u00ff\u00ff\u00ff\u00ff"
}
]
}

0 comments on commit e2353bd

Please sign in to comment.