1
0
mirror of https://github.com/deavmi/birchwood synced 2024-09-20 15:22:53 +02:00
- Added unit test for `hasIllegalCharacters(string)`
This commit is contained in:
Tristan B. Velloza Kildaire 2023-06-21 14:39:05 +02:00
parent 80a6baf0f9
commit 229a137e34

View File

@ -609,3 +609,16 @@ public final class Message
return replyType; return replyType;
} }
} }
version(unittest)
{
// Contains illegal characters
string badString1 = "doos"~"bruh"~"lek"~cast(string)[10]~"ker";
string badString2 = "doos"~"bruh"~"lek"~cast(string)[13]~"ker";
}
unittest
{
assert(Message.hasIllegalCharacters(badString1) == true);
assert(Message.hasIllegalCharacters(badString2) == true);
}