commit: 0e89a9ad15bd86731b3babfced990d1d8ec7db4c
parent c3a07035646b255bc5f33743d13defbaa69d9991
Author: tusooa <tusooa@kazv.moe>
Date: Sat, 5 Nov 2022 23:36:10 -0400
Test that zwnj is treated as word char in hashtags
Diffstat:
1 file changed, 9 insertions(+), 0 deletions(-)
diff --git a/test/pleroma/web/common_api_test.exs b/test/pleroma/web/common_api_test.exs
@@ -518,6 +518,15 @@ defmodule Pleroma.Web.CommonAPITest do
assert Object.tags(object) == ["2hu"]
end
+ test "zwnj is treated as word character" do
+ user = insert(:user)
+ {:ok, activity} = CommonAPI.post(user, %{status: "#ساٴينس"})
+
+ object = Object.normalize(activity, fetch: false)
+
+ assert Object.tags(object) == ["ساٴينس"]
+ end
+
test "it adds emoji in the object" do
user = insert(:user)
{:ok, activity} = CommonAPI.post(user, %{status: ":firefox:"})