Add test for returned proxy tags
This commit is contained in:
parent
0f041c2e3c
commit
4ea06b939a
@ -73,5 +73,17 @@ namespace PluralKit.Tests
|
|||||||
[InlineData("{bogus tags, idk}")]
|
[InlineData("{bogus tags, idk}")]
|
||||||
public void NoMembersMatchNothing(string input) =>
|
public void NoMembersMatchNothing(string input) =>
|
||||||
Assert.False(parser.TryMatch(new ProxyMember[]{}, input, out _));
|
Assert.False(parser.TryMatch(new ProxyMember[]{}, input, out _));
|
||||||
|
|
||||||
|
[Theory]
|
||||||
|
[InlineData("{hello world}", "{", "}")]
|
||||||
|
[InlineData("[some other tags]", "[", "]")]
|
||||||
|
[InlineData("-manytags has multiple sets-", "-", "-")]
|
||||||
|
[InlineData("<and it should return the correct set>", "<", ">")]
|
||||||
|
public void ReturnedProxyTagsShouldMatchInput(string input, string expectedPrefix, string expectedSuffix)
|
||||||
|
{
|
||||||
|
Assert.True(parser.TryMatch(members, input, out var result));
|
||||||
|
Assert.Equal(expectedPrefix, result.ProxyTags?.Prefix);
|
||||||
|
Assert.Equal(expectedSuffix, result.ProxyTags?.Suffix);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user