summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2005-10-29 21:13:50 +0200
committerAndreas Gohr <andi@splitbrain.org>2005-10-29 21:13:50 +0200
commit6640792b86ac86bf8f51dcb48e250b5f8f4c9036 (patch)
treea63089b7f5a9d076682eab351e5ee679bf834662
parent78a6aeb15ad85c8be4a7e39307b7d9aa0512742c (diff)
downloadrpg-6640792b86ac86bf8f51dcb48e250b5f8f4c9036.tar.gz
rpg-6640792b86ac86bf8f51dcb48e250b5f8f4c9036.tar.bz2
unit test for CSS compressor
darcs-hash:20051029191350-7ad00-6f9d12f1a1799092e0dca39987e5fe359cb38036.gz
-rw-r--r--_test/cases/lib/exe/css_css_compress.test.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/_test/cases/lib/exe/css_css_compress.test.php b/_test/cases/lib/exe/css_css_compress.test.php
new file mode 100644
index 000000000..138635999
--- /dev/null
+++ b/_test/cases/lib/exe/css_css_compress.test.php
@@ -0,0 +1,31 @@
+<?php
+
+require_once DOKU_INC.'lib/exe/css.php';
+
+
+class css_css_compress_test extends UnitTestCase {
+
+ function test_mlcom1(){
+ $text = '/**
+ * A multi
+ * line *test*
+ * check
+ */';
+ $this->assertEqual(css_compress($text), '');
+ }
+
+ function test_mlcom2(){
+ $text = '#comment/* */ {
+ color: lime;
+ }';
+ $this->assertEqual(css_compress($text), '#comment/* */{color:lime;}');
+ }
+
+ function test_nl1(){
+ $text = "a{left:20px;\ntop:20px}";
+ $this->assertEqual(css_compress($text), 'a{left:20px;top:20px}');
+ }
+
+}
+
+//Setup VIM: ex: et ts=4 enc=utf-8 :