summaryrefslogtreecommitdiff
path: root/_test/cases
diff options
context:
space:
mode:
authorAdrian Lang <mail@adrianlang.de>2011-04-14 07:57:49 +0200
committerAdrian Lang <mail@adrianlang.de>2011-04-14 08:37:19 +0200
commit45a0fa152ba78aed840341ef83613c58c0ea706e (patch)
treec8d7f47136b6f25c05f7c0a42e3a307c141cdf23 /_test/cases
parent32ed2b361abb0cb00bee6572d022684260f0edd2 (diff)
downloadrpg-45a0fa152ba78aed840341ef83613c58c0ea706e.tar.gz
rpg-45a0fa152ba78aed840341ef83613c58c0ea706e.tar.bz2
Support the empty link [[]]
Diffstat (limited to '_test/cases')
-rw-r--r--_test/cases/inc/parser/parser_links.test.php15
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");