From b6cc2b6938bd6347a8946666068dda831c846b13 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag <klapinklapin@gmail.com> Date: Sat, 19 Mar 2016 15:31:40 +0100 Subject: [PATCH] let path to revision file in tests depend on compression setting --- _test/tests/inc/common_pageinfo.test.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/_test/tests/inc/common_pageinfo.test.php b/_test/tests/inc/common_pageinfo.test.php index 2b230d9ce..adc9538d2 100644 --- a/_test/tests/inc/common_pageinfo.test.php +++ b/_test/tests/inc/common_pageinfo.test.php @@ -128,6 +128,10 @@ class common_pageinfo_test extends DokuWikiTest { $filename = $conf['datadir'].'/wiki/syntax.txt'; $rev = filemtime($filename); $REV = $rev - 100; + $ext = '.txt'; + if($conf['compression']) { //compression in $info['filepath'] determined by wikiFN depends also on if the page exist + $ext .= "." . $conf['compression']; //.gz or .bz2 + } $info = $this->_get_expected_pageinfo(); $info['id'] = 'wiki:syntax'; @@ -135,7 +139,7 @@ class common_pageinfo_test extends DokuWikiTest { $info['meta'] = p_get_metadata($ID); $info['rev'] = $REV; $info['currentrev'] = $rev; - $info['filepath'] = str_replace('pages','attic',substr($filename,0,-3).$REV.'.txt.gz'); + $info['filepath'] = str_replace('pages','attic',substr($filename,0,-3).$REV.$ext); $this->assertEquals($info, pageinfo()); $this->assertEquals($rev-100, $REV); -- GitLab