X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=tests%2FHashTagDetectionTests.php;h=1fbc98983d66ab09a400b45990c9794103bf000f;hb=0df853183485add783c59e9fac3a58258918817b;hp=aeac4a5e3f6c932ac0e26a24b2c5610ed3999de1;hpb=b3b3af9a2eff10c272bb213eccd3dd3060bc5830;p=quix0rs-gnu-social.git
diff --git a/tests/HashTagDetectionTests.php b/tests/HashTagDetectionTests.php
index aeac4a5e3f..1fbc98983d 100644
--- a/tests/HashTagDetectionTests.php
+++ b/tests/HashTagDetectionTests.php
@@ -6,7 +6,8 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) {
}
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
-define('STATUSNET', true);
+define('GNUSOCIAL', true);
+define('STATUSNET', true); // compatibility
require_once INSTALLDIR . '/lib/common.php';
@@ -41,6 +42,21 @@ class HashTagDetectionTests extends PHPUnit_Framework_TestCase
'say {#hello} people'),
array('say \'#hello\' people',
'say \'#hello\' people'),
+
+ // Unicode legit letters
+ array('#éclair yummy',
+ '#éclair yummy'),
+ array('#ç»´åºç¾ç§ zh.wikipedia!',
+ '#ç»´åºç¾ç§ zh.wikipedia!'),
+ array('#РоÑÑÐ¸Ñ russia',
+ '#РоÑÑÐ¸Ñ russia'),
+
+ // Unicode punctuators -- the ideographic "ï¼" separates the tag, just as "," does
+ array('#ç»´åºç¾ç§,zh.wikipedia!',
+ '#ç»´åºç¾ç§,zh.wikipedia!'),
+ array('#ç»´åºç¾ç§ï¼zh.wikipedia!',
+ '#ç»´åºç¾ç§ï¼zh.wikipedia!'),
+
);
}
}