From d301130ed39d5dad319c60cdb3879c6751611831 Mon Sep 17 00:00:00 2001 From: Christopher Smith <chris@jalakai.co.uk> Date: Sat, 19 Oct 2013 14:35:22 +0100 Subject: [PATCH] additional auth_nameencode tests (apostrophe & backslash) --- _test/tests/inc/auth_nameencode.test.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/_test/tests/inc/auth_nameencode.test.php b/_test/tests/inc/auth_nameencode.test.php index da9f31f90..074155486 100644 --- a/_test/tests/inc/auth_nameencode.test.php +++ b/_test/tests/inc/auth_nameencode.test.php @@ -19,6 +19,18 @@ class auth_nameencode_test extends DokuWikiTest { $this->assertEquals(auth_nameencode($in),$out); } + function test_apostrophe(){ + $in = 'hey\'you'; + $out = 'hey%27you'; + $this->assertEquals(auth_nameencode($in),$out); + } + + function test_backslash(){ + $in = 'hey\\you'; + $out = 'hey%5cyou'; + $this->assertEquals(auth_nameencode($in),$out); + } + function test_complex(){ $in = 'hey $ you !$%! foo '; $out = 'hey%20%24%20you%20%21%24%25%21%20foo%20'; -- GitLab