Skip to content

Commit 45cb9ad

Browse files
committed
Verify unicode bytes in string literals.
1 parent 34b9762 commit 45cb9ad

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ServerCodeExciserTest/AngelscriptSyntaxTests.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,13 @@ public void FunctionModifier(string modifier)
6060
[DataRow("float64", "0.0")]
6161
[DataRow("doublt", "0.0")]
6262
[DataRow("bool", "false")]
63-
[DataRow("string", "\"\"\"\r\nmulti line string\r\n\"\"\"")] // heredoc: https://www.angelcode.com/angelscript/sdk/docs/manual/doc_datatypes_strings.html
63+
[DataRow("string", "\"\\0\"")]
64+
[DataRow("string", "\"\\xFFFF\"")]
65+
[DataRow("string", "\"\\uFFFF\"")]
66+
[DataRow("string", "\"\\uFFFFFFFF\"")]
67+
[DataRow("string", "\"\"\"\r\nheredoc string\r\n\"\"\"")] // heredoc: https://www.angelcode.com/angelscript/sdk/docs/manual/doc_datatypes_strings.html
6468
[DataRow("FName", "n\"MyName\"")] // FName Literals: https://angelscript.hazelight.se/scripting/fname-literals/
65-
[DataRow("string", "f\"Formatted String: {L:0.1f}\\u00B0\"")] // Formatted Strings: https://angelscript.hazelight.se/scripting/format-strings/
69+
[DataRow("string", "f\"Formatted String: {L:0.1f}\"")] // Formatted Strings: https://angelscript.hazelight.se/scripting/format-strings/
6670
public void DataType(string type, string value)
6771
{
6872
ParseScript($"{type} VAR = {value};");

0 commit comments

Comments
 (0)