diff options
author | Adrian Lang <mail@adrianlang.de> | 2011-04-14 07:57:49 +0200 |
---|---|---|
committer | Adrian Lang <mail@adrianlang.de> | 2011-04-14 08:37:19 +0200 |
commit | 45a0fa152ba78aed840341ef83613c58c0ea706e (patch) | |
tree | c8d7f47136b6f25c05f7c0a42e3a307c141cdf23 /_test | |
parent | 32ed2b361abb0cb00bee6572d022684260f0edd2 (diff) | |
download | rpg-45a0fa152ba78aed840341ef83613c58c0ea706e.tar.gz rpg-45a0fa152ba78aed840341ef83613c58c0ea706e.tar.bz2 |
Support the empty link [[]]
Diffstat (limited to '_test')
-rw-r--r-- | _test/cases/inc/parser/parser_links.test.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/_test/cases/inc/parser/parser_links.test.php b/_test/cases/inc/parser/parser_links.test.php index a4a8c5826..53871e110 100644 --- a/_test/cases/inc/parser/parser_links.test.php +++ b/_test/cases/inc/parser/parser_links.test.php @@ -221,6 +221,21 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); } + function testInternalLinkNoChar() { + $this->P->addMode('internallink',new Doku_Parser_Mode_InternalLink()); + $this->P->parse("Foo [[]] Bar"); + $calls = array ( + array('document_start',array()), + array('p_open',array()), + array('cdata',array("\n".'Foo ')), + array('internallink',array('',NULL)), + array('cdata',array(' Bar')), + array('p_close',array()), + array('document_end',array()), + ); + $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + } + function testInternalLinkNamespaceNoTitle() { $this->P->addMode('internallink',new Doku_Parser_Mode_InternalLink()); $this->P->parse("Foo [[foo:bar]] Bar"); |