summaryrefslogtreecommitdiffstats
path: root/model/utils_test.go
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2016-01-25 16:47:49 -0500
committerhmhealey <harrisonmhealey@gmail.com>2016-01-26 10:20:36 -0500
commit97ede2a428faf3a62ce0140e51ed591e261c09a1 (patch)
tree579a8970f42373bc99ed12dc6d46f0c47947815a /model/utils_test.go
parentab5425f9b9f8a2e3ead637a27dc01bc9d06e16b7 (diff)
downloadchat-97ede2a428faf3a62ce0140e51ed591e261c09a1.tar.gz
chat-97ede2a428faf3a62ce0140e51ed591e261c09a1.tar.bz2
chat-97ede2a428faf3a62ce0140e51ed591e261c09a1.zip
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) {