From 4ea06b939a472e4cabac1196eda6d6dec9baf956 Mon Sep 17 00:00:00 2001 From: Ske Date: Sun, 14 Jun 2020 19:20:02 +0200 Subject: [PATCH] Add test for returned proxy tags --- PluralKit.Tests/ProxyTagParserTests.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/PluralKit.Tests/ProxyTagParserTests.cs b/PluralKit.Tests/ProxyTagParserTests.cs index 568b8b6f..ba8db878 100644 --- a/PluralKit.Tests/ProxyTagParserTests.cs +++ b/PluralKit.Tests/ProxyTagParserTests.cs @@ -73,5 +73,17 @@ namespace PluralKit.Tests [InlineData("{bogus tags, idk}")] public void NoMembersMatchNothing(string input) => Assert.False(parser.TryMatch(new ProxyMember[]{}, input, out _)); + + [Theory] + [InlineData("{hello world}", "{", "}")] + [InlineData("[some other tags]", "[", "]")] + [InlineData("-manytags has multiple sets-", "-", "-")] + [InlineData("", "<", ">")] + 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); + } } } \ No newline at end of file