From 9e760ee516dd6e50390490f6d5585b854b895808 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 13 Mar 2012 17:32:53 +0100 Subject: added (failing) test for cleanText() The cleanText function is supposed to convert DOS to Unix lineendings but it seems that it doesn't always do that correctly as this thread suggests: http://forum.dokuwiki.org/thread/8141 I added a unit test that currently fails but haven't found the real cause yet. Further testing (and a fix) is needed. --- _test/cases/inc/common_cleanText.test.php | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 _test/cases/inc/common_cleanText.test.php (limited to '_test') diff --git a/_test/cases/inc/common_cleanText.test.php b/_test/cases/inc/common_cleanText.test.php new file mode 100644 index 000000000..571e41fa5 --- /dev/null +++ b/_test/cases/inc/common_cleanText.test.php @@ -0,0 +1,31 @@ +assertEqual($unix,cleanText($unix)); + } + + function test_win(){ + $unix = 'one + two + + three'; + $win = 'one + two + + three'; + $this->assertNotEqual($unix,$win); + $this->assertEqual($unix,cleanText($win)); + } +} + +//Setup VIM: ex: et ts=4 : -- cgit v1.2.3