diff options
author | 2022-07-03 11:03:03 +0200 | |
---|---|---|
committer | 2022-07-03 11:03:03 +0200 | |
commit | 664713ddd4f7236fde0759cf7a0e04a434417876 (patch) | |
tree | 00728ee68bde82534d4bdf5659a3ed9c41f6a6b8 /internal/util/statustools_test.go | |
parent | [feature] Cleanup unattached local media (#680) (diff) | |
download | gotosocial-664713ddd4f7236fde0759cf7a0e04a434417876.tar.xz |
[bugfix] Make hashtag regex work with non-ascii characters (#682)
Diffstat (limited to 'internal/util/statustools_test.go')
-rw-r--r-- | internal/util/statustools_test.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/internal/util/statustools_test.go b/internal/util/statustools_test.go index bea89158a..d9f344e4b 100644 --- a/internal/util/statustools_test.go +++ b/internal/util/statustools_test.go @@ -83,15 +83,20 @@ func (suite *StatusTestSuite) TestDeriveHashtagsOK() { #ThisShouldAlsoWork #not_this_though -#111111 thisalsoshouldn'twork#### ##` +#111111 thisalsoshouldn'twork#### ## + +#alimentación, #saúde +` tags := util.DeriveHashtagsFromText(statusText) - assert.Len(suite.T(), tags, 5) + assert.Len(suite.T(), tags, 7) assert.Equal(suite.T(), "testing123", tags[0]) assert.Equal(suite.T(), "also", tags[1]) assert.Equal(suite.T(), "thisshouldwork", tags[2]) assert.Equal(suite.T(), "ThisShouldAlsoWork", tags[3]) assert.Equal(suite.T(), "111111", tags[4]) + assert.Equal(suite.T(), "alimentación", tags[5]) + assert.Equal(suite.T(), "saúde", tags[6]) } func (suite *StatusTestSuite) TestDeriveEmojiOK() { |