summaryrefslogtreecommitdiffstats
path: root/model/utils_test.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-01-27 07:38:10 -0500
committerJoram Wilander <jwawilander@gmail.com>2016-01-27 07:38:10 -0500
commite5ed90821e6bb25c27e5627cf289df41cbcb1793 (patch)
tree98446b1586e29afbedb92f9a63446d12a72f8b83 /model/utils_test.go
parentefc4d239e14707de27b149b76f1dd4065838410c (diff)
parent97ede2a428faf3a62ce0140e51ed591e261c09a1 (diff)
downloadchat-e5ed90821e6bb25c27e5627cf289df41cbcb1793.tar.gz
chat-e5ed90821e6bb25c27e5627cf289df41cbcb1793.tar.bz2
chat-e5ed90821e6bb25c27e5627cf289df41cbcb1793.zip
Merge pull request #1984 from hmhealey/plt1103
PLT-1103 Updated serverside hashtag regex to ignore more punctuation around words
Diffstat (limited to 'model/utils_test.go')
-rw-r--r--model/utils_test.go41
1 files changed, 28 insertions, 13 deletions
diff --git a/model/utils_test.go b/model/utils_test.go
index 24ee4b7a6..b8eabe264 100644
--- a/model/utils_test.go
+++ b/model/utils_test.go
@@ -83,19 +83,34 @@ func TestEtag(t *testing.T) {
}
var hashtags map[string]string = map[string]string{
- "#test": "#test",
- "test": "",
- "#test123": "#test123",
- "#123test123": "",
- "#test-test": "#test-test",
- "#test?": "#test",
- "hi #there": "#there",
- "#bug #idea": "#bug #idea",
- "#bug or #gif!": "#bug #gif",
- "#hüllo": "#hüllo",
- "#?test": "",
- "#-test": "",
- "#yo_yo": "#yo_yo",
+ "#test": "#test",
+ "test": "",
+ "#test123": "#test123",
+ "#123test123": "",
+ "#test-test": "#test-test",
+ "#test?": "#test",
+ "hi #there": "#there",
+ "#bug #idea": "#bug #idea",
+ "#bug or #gif!": "#bug #gif",
+ "#hüllo": "#hüllo",
+ "#?test": "",
+ "#-test": "",
+ "#yo_yo": "#yo_yo",
+ "(#brakets)": "#brakets",
+ ")#stekarb(": "#stekarb",
+ "<#less_than<": "#less_than",
+ ">#greater_than>": "#greater_than",
+ "-#minus-": "#minus",
+ "+#plus+": "#plus",
+ "=#equals=": "#equals",
+ "%#pct%": "#pct",
+ "&#and&": "#and",
+ "^#hat^": "#hat",
+ "##brown#": "#brown",
+ "*#star*": "#star",
+ "|#pipe|": "#pipe",
+ ":#colon:": "#colon",
+ ";#semi;": "#semi",
}
func TestParseHashtags(t *testing.T) {