summaryrefslogtreecommitdiff
path: root/_test/tests
diff options
context:
space:
mode:
Diffstat (limited to '_test/tests')
-rw-r--r--_test/tests/inc/cache_use.test.php7
-rw-r--r--_test/tests/lib/exe/css_css_compress.test.php15
2 files changed, 20 insertions, 2 deletions
diff --git a/_test/tests/inc/cache_use.test.php b/_test/tests/inc/cache_use.test.php
index c54a472a3..02fe329de 100644
--- a/_test/tests/inc/cache_use.test.php
+++ b/_test/tests/inc/cache_use.test.php
@@ -18,11 +18,14 @@ class cache_use_test extends DokuWikiTest {
$conf['cachetime'] = 0; // ensure the value is not -1, which disables caching
saveWikiText($ID, 'Content', 'Created');
- // set the modification time a second in the past in order to ensure that the cache is newer than the page
- touch($file, time()-1);
$this->cache = new cache_renderer($ID, $file, 'xhtml');
$this->cache->storeCache('Test');
+
+ // set the modification times explicitly (overcome Issue #694)
+ $time = time();
+ touch($file, $time-1);
+ touch($this->cache->cache, $time);
}
function test_use() {
diff --git a/_test/tests/lib/exe/css_css_compress.test.php b/_test/tests/lib/exe/css_css_compress.test.php
index f0eb17968..807317ca6 100644
--- a/_test/tests/lib/exe/css_css_compress.test.php
+++ b/_test/tests/lib/exe/css_css_compress.test.php
@@ -53,6 +53,21 @@ class css_css_compress_test extends DokuWikiTest {
$this->assertEquals('#foo{background-image:url(http://foo.bar/baz.jpg);}', css_compress($text));
}
+ function test_slcom6(){
+ $text = '#foo {
+ background-image: url(//foo.bar/baz.jpg); // background-image: url(http://foo.bar/baz.jpg); this is all commented
+ }';
+ $this->assertEquals('#foo{background-image:url(//foo.bar/baz.jpg);}', css_compress($text));
+ }
+
+ function test_slcom7(){
+ $text = '#foo a[href ^="https://"], #foo a[href ^=\'https://\'] {
+ background-image: url(//foo.bar/baz.jpg); // background-image: url(http://foo.bar/baz.jpg); this is \'all\' "commented"
+ }';
+ $this->assertEquals('#foo a[href ^="https://"],#foo a[href ^=\'https://\']{background-image:url(//foo.bar/baz.jpg);}', css_compress($text));
+ }
+
+
function test_hack(){
$text = '/* Mac IE will not see this and continue with inline-block */
/* \\*/