Skip to content

Commit

Permalink
add tests for usernames with 2 & 3 byte utf8 characters
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris--S committed Oct 19, 2013
1 parent a758ffa commit 698e7df
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions _test/tests/inc/auth_nameencode.test.php
Expand Up @@ -42,6 +42,22 @@ function test_groupskipoff(){
$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 :

0 comments on commit 698e7df

Please sign in to comment.