summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--_test/cases/inc/common_cleanText.test.php31
1 files changed, 31 insertions, 0 deletions
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 @@
+<?php
+
+require_once DOKU_INC.'inc/init.php';
+require_once DOKU_INC.'inc/common.php';
+
+class common_clientIP_test extends UnitTestCase {
+
+ function test_unix(){
+ $unix = 'one
+ two
+
+ three';
+
+ $this->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 :