From fdd9bab63c332a19e213c2cf7c986b8b95e25af6 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Thu, 1 Aug 2013 11:37:00 +0200 Subject: increase test coverage for code and file code - test correct recognition of downloadable filename token file - test correct recognition of syntax name & downloadable filename tokens --- _test/tests/inc/parser/parser_code.test.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to '_test/tests/inc/parser/parser_code.test.php') diff --git a/_test/tests/inc/parser/parser_code.test.php b/_test/tests/inc/parser/parser_code.test.php index 4f89b4826..c50d2d328 100644 --- a/_test/tests/inc/parser/parser_code.test.php +++ b/_test/tests/inc/parser/parser_code.test.php @@ -40,6 +40,22 @@ class TestOfDoku_Parser_Code extends TestOfDoku_Parser { $this->assertEquals(array_map('stripbyteindex',$this->H->calls),$calls); } + function testCodeDownload() { + $this->P->parse('Foo Test Bar'); + $calls = array ( + array('document_start',array()), + array('p_open',array()), + array('cdata',array("\n".'Foo ')), + array('p_close',array()), + array('code',array('Test','bash','script.sh')), + 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 testCodeToken() { $this->P->parse('Foo BarTest'); $calls = array ( -- cgit v1.2.3