mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
Add substring tests
This commit is contained in:
parent
3dcb83778f
commit
6086f46bed
|
@ -19,3 +19,11 @@ TEST(NameBan, Equality)
|
|||
ASSERT_FALSE(IsNameBanned("def", &Abc0, 1));
|
||||
ASSERT_FALSE(IsNameBanned("abcdef", &Abc0, 1));
|
||||
}
|
||||
|
||||
TEST(NameBan, Substring)
|
||||
{
|
||||
CNameBan Xyz("xyz", 0, 1);
|
||||
ASSERT_TRUE(IsNameBanned("abcxyz", &Xyz, 1));
|
||||
ASSERT_TRUE(IsNameBanned("abcxyzdef", &Xyz, 1));
|
||||
ASSERT_FALSE(IsNameBanned("abcdef", &Xyz, 1));
|
||||
}
|
Loading…
Reference in a new issue