summaryrefslogtreecommitdiff
path: root/_test/tests/inc/auth_nameencode.test.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2013-10-28 04:27:44 -0700
committerAndreas Gohr <andi@splitbrain.org>2013-10-28 04:27:44 -0700
commit1a3aae1d461842aa814160e5e1b13b1ab9116c8a (patch)
tree7858ec5f9d737a83539c32a24c44b45756dbf757 /_test/tests/inc/auth_nameencode.test.php
parent0f91b38c17dcd12ce5b73ad8312851f67244b080 (diff)
parent30eae85545994c10dcacb2d7becceaf569c99f65 (diff)
downloadrpg-1a3aae1d461842aa814160e5e1b13b1ab9116c8a.tar.gz
rpg-1a3aae1d461842aa814160e5e1b13b1ab9116c8a.tar.bz2
Merge pull request #395 from splitbrain/FS#2867
FS#2867, ACL processing may fail with utf-8 characters which include byte 'A0'.
Diffstat (limited to '_test/tests/inc/auth_nameencode.test.php')
-rw-r--r--_test/tests/inc/auth_nameencode.test.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/_test/tests/inc/auth_nameencode.test.php b/_test/tests/inc/auth_nameencode.test.php
index 074155486..86db843d6 100644
--- a/_test/tests/inc/auth_nameencode.test.php
+++ b/_test/tests/inc/auth_nameencode.test.php
@@ -54,6 +54,22 @@ class auth_nameencode_test extends DokuWikiTest {
$out = '%40hey%24you';
$this->assertEquals(auth_nameencode($in),$out);
}
+
+ // include a two byte utf8 character which shouldn't be encoded
+ function test_hebrew(){
+ $in = 'nun-נ8';
+ $expect = 'nun%2dנ8';
+
+ $this->assertEquals($expect, auth_nameencode($in));
+ }
+
+ // include a three byte utf8 character which shouldn't be encoded
+ function test_devanagiri(){
+ $in = 'ut-fठ8';
+ $expect = 'ut%2dfठ8';
+
+ $this->assertEquals($expect, auth_nameencode($in));
+ }
}
//Setup VIM: ex: et ts=4 :