diff options
| author | levlam <levlam@telegram.org> | 2022-07-29 16:23:05 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2022-07-29 16:23:05 +0300 |
| commit | 8f81a46ede62afccec21058de8cf6f1c2326d929 (patch) | |
| tree | c2ee694d9c2809332e7c9752eb330448d7630959 /test/message_entities.cpp | |
| parent | 8072fe673ea12349cc35d9db452f0d6a07846a7b (diff) | |
Allow some new characters in hashtags.
Diffstat (limited to 'test/message_entities.cpp')
| -rw-r--r-- | test/message_entities.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/message_entities.cpp b/test/message_entities.cpp index 7b50d2427..3ceaa0a17 100644 --- a/test/message_entities.cpp +++ b/test/message_entities.cpp @@ -114,6 +114,8 @@ TEST(MessageEntities, hashtag) { "ООО" + td::string(200, '2'), {"#" + td::string(200, '1') + "ООО" + td::string(53, '2')}); check_hashtag(u8"#a\u2122", {"#a"}); + check_hashtag("#a൹", {"#a"}); + check_hashtag("#aඁං෴ก฿", {"#aඁං෴ก"}); } static void check_cashtag(const td::string &str, const td::vector<td::string> &expected) { @@ -173,6 +175,12 @@ TEST(MessageEntities, cashtag) { check_cashtag(u8"$ABC\u2122", {"$ABC"}); check_cashtag(u8"\u2122$ABC", {"$ABC"}); check_cashtag(u8"\u2122$ABC\u2122", {"$ABC"}); + check_cashtag("$ABC൹", {"$ABC"}); + check_cashtag("$ABCඁ", {}); + check_cashtag("$ABCං", {}); + check_cashtag("$ABC෴", {}); + check_cashtag("$ABCก", {}); + check_cashtag("$ABC฿", {"$ABC"}); } static void check_media_timestamp(const td::string &str, const td::vector<std::pair<td::string, td::int32>> &expected) { |
