diff options
Diffstat (limited to 'model/utils_test.go')
-rw-r--r-- | model/utils_test.go | 43 |
1 files changed, 29 insertions, 14 deletions
diff --git a/model/utils_test.go b/model/utils_test.go index 24ee4b7a6..02a08d113 100644 --- a/model/utils_test.go +++ b/model/utils_test.go @@ -27,7 +27,7 @@ func TestRandomString(t *testing.T) { } func TestAppError(t *testing.T) { - err := NewAppError("TestAppError", "message", "") + err := NewLocAppError("TestAppError", "message", nil, "") json := err.ToJson() rerr := AppErrorFromJson(strings.NewReader(json)) if err.Message != rerr.Message { @@ -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) { |