From 561d3f87cc22e10ca9d9102bd916489f17b62a3a Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Sun, 1 Apr 2012 22:27:55 +0200 Subject: reenabled mail_quited_printable_encode test in simpletest --- _test/cases/inc/mail_quoted_printable_encode.php | 44 ---------------------- .../inc/mail_quoted_printable_encode.test.php | 44 ++++++++++++++++++++++ 2 files changed, 44 insertions(+), 44 deletions(-) delete mode 100644 _test/cases/inc/mail_quoted_printable_encode.php create mode 100644 _test/cases/inc/mail_quoted_printable_encode.test.php diff --git a/_test/cases/inc/mail_quoted_printable_encode.php b/_test/cases/inc/mail_quoted_printable_encode.php deleted file mode 100644 index a5a36e35b..000000000 --- a/_test/cases/inc/mail_quoted_printable_encode.php +++ /dev/null @@ -1,44 +0,0 @@ -assertEqual(mail_quotedprintable_encode($in),$out); - } - - function test_spaceend(){ - $in = "hello \nhello"; - $out = "hello=20\nhello"; - $this->assertEqual(mail_quotedprintable_encode($in),$out); - } - - function test_german_utf8(){ - $in = 'hello überlänge'; - $out = 'hello =C3=BCberl=C3=A4nge'; - $this->assertEqual(mail_quotedprintable_encode($in),$out); - } - - function test_wrap(){ - $in = '123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789'; - $out = "123456789 123456789 123456789 123456789 123456789 123456789 123456789 1234=\n56789 123456789"; - $this->assertEqual(mail_quotedprintable_encode($in,74),$out); - } - - function test_nowrap(){ - $in = '123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789'; - $out = '123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789'; - $this->assertEqual(mail_quotedprintable_encode($in,0),$out); - } - - function test_russian_utf8(){ - $in = 'Ваш пароль для системы Доку Вики'; - $out = '=D0=92=D0=B0=D1=88 =D0=BF=D0=B0=D1=80=D0=BE=D0=BB=D1=8C =D0=B4=D0=BB=D1=8F =D1=81=D0=B8=D1=81=D1=82=D0=B5=D0=BC=D1=8B =D0=94=D0=BE=D0=BA=D1=83 =D0=92=D0=B8=D0=BA=D0=B8'; - $this->assertEqual(mail_quotedprintable_encode($in,0),$out); - } -} - -//Setup VIM: ex: et ts=4 : diff --git a/_test/cases/inc/mail_quoted_printable_encode.test.php b/_test/cases/inc/mail_quoted_printable_encode.test.php new file mode 100644 index 000000000..a5a36e35b --- /dev/null +++ b/_test/cases/inc/mail_quoted_printable_encode.test.php @@ -0,0 +1,44 @@ +assertEqual(mail_quotedprintable_encode($in),$out); + } + + function test_spaceend(){ + $in = "hello \nhello"; + $out = "hello=20\nhello"; + $this->assertEqual(mail_quotedprintable_encode($in),$out); + } + + function test_german_utf8(){ + $in = 'hello überlänge'; + $out = 'hello =C3=BCberl=C3=A4nge'; + $this->assertEqual(mail_quotedprintable_encode($in),$out); + } + + function test_wrap(){ + $in = '123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789'; + $out = "123456789 123456789 123456789 123456789 123456789 123456789 123456789 1234=\n56789 123456789"; + $this->assertEqual(mail_quotedprintable_encode($in,74),$out); + } + + function test_nowrap(){ + $in = '123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789'; + $out = '123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789'; + $this->assertEqual(mail_quotedprintable_encode($in,0),$out); + } + + function test_russian_utf8(){ + $in = 'Ваш пароль для системы Доку Вики'; + $out = '=D0=92=D0=B0=D1=88 =D0=BF=D0=B0=D1=80=D0=BE=D0=BB=D1=8C =D0=B4=D0=BB=D1=8F =D1=81=D0=B8=D1=81=D1=82=D0=B5=D0=BC=D1=8B =D0=94=D0=BE=D0=BA=D1=83 =D0=92=D0=B8=D0=BA=D0=B8'; + $this->assertEqual(mail_quotedprintable_encode($in,0),$out); + } +} + +//Setup VIM: ex: et ts=4 : -- cgit v1.2.3