logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: 686fef59db4c2489b8de1d6aa7f9f06066ff06bc
parent 2bc6911139a3aee68bc29d3c9838c7730d5ae706
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:

Mtest/pleroma/web/common_api_test.exs9+++++++++
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:"})