Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ public class BestCheapViewersTests : AChatRuleUnitTestBase<BestCheapViewers> {
/// </summary>
/// <param name="badString">The string that should fail.</param>
[Test]
[TestCase("C\u032dheap viewe\u034crs on\u0306 vwrpro.ru @8v2JcQFL")]
[TestCase("Ch\u031ae\u0345ap viewers on *** @STGPMoLg")]
[TestCase("Best\u036e vie\u0350wers \u0337on ***")]
[TestCase("Best viewers on ***")]
[TestCase("Best viewers on ***")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class DogehypeTests : AChatRuleUnitTestBase<Dogehype> {
/// </summary>
/// <param name="badString">The string that should fail.</param>
[Test]
[TestCase("Visit dogehype dot com today and effortlessly boost your Twitch rankings! @opAzPMVt")]
[TestCase("Visit dogehype dot com and watch your channel grow today! @5MGxTnYl")]
[TestCase("Visit dogehype dot com today and climb the Twitch rankings with ease! Whether you're just starting out or looking to take your stream to the next level, DogeHype has the tools you need to succeed. @gqznceDC")]
[TestCase("Visit dogehype .biz com today and climb the Twitch rankings with ease! Whether you're just starting out or looking to take your stream to the next level, DogeHype has the tools you need to succeed. @Axxq7ntz")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public override async Task<bool> Handle(string channelId, ITwitchApiProxy botPro
int offset = 0;
for (int i = 0; i < expected.Length; i++) {
// If this is a normal character it should be in the correct position.
if (normalized[i + offset] == expected[i]) {
if (i + offset < normalized.Length && normalized[i + offset] == expected[i]) {
++matches;
}
// If this is an accent mark then the next character should match and the whole string we're evalutating
Expand Down