summaryrefslogtreecommitdiff
path: root/_test/tests/inc/parser/parser_file.test.php
diff options
context:
space:
mode:
Diffstat (limited to '_test/tests/inc/parser/parser_file.test.php')
-rw-r--r--_test/tests/inc/parser/parser_file.test.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/_test/tests/inc/parser/parser_file.test.php b/_test/tests/inc/parser/parser_file.test.php
index 924b00382..39bda8a58 100644
--- a/_test/tests/inc/parser/parser_file.test.php
+++ b/_test/tests/inc/parser/parser_file.test.php
@@ -24,5 +24,33 @@ class TestOfDoku_Parser_File extends TestOfDoku_Parser {
$this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
}
+ function testFileHighlightDownload() {
+ $this->P->parse('Foo <file txt test.txt>Test</file> Bar');
+ $calls = array (
+ array('document_start',array()),
+ array('p_open',array()),
+ array('cdata',array("\n".'Foo ')),
+ array('p_close',array()),
+ array('file',array('Test','txt','test.txt')),
+ array('p_open',array()),
+ array('cdata',array(' Bar')),
+ array('p_close',array()),
+ array('document_end',array()),
+ );
+ $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+ }
+
+ function testFileToken() {
+ $this->P->parse('Foo <file2>Test</file2> Bar');
+ $calls = array (
+ array('document_start',array()),
+ array('p_open',array()),
+ array('cdata',array("\n".'Foo <file2>Test</file2> Bar')),
+ array('p_close',array()),
+ array('document_end',array()),
+ );
+ $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls);
+ }
+
}