From 26b657a1a40c6eb68443bac86ef032a3c4b05fc5 Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 25 Jan 2007 15:38:48 +0100 Subject: additional unit tests for email addresses darcs-hash:20070125143848-9b6ab-490215e5feef3a7f6ed268ee03a6cfe4ced1afbb.gz --- _test/cases/inc/parser/parser_links.test.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to '_test/cases/inc/parser/parser_links.test.php') diff --git a/_test/cases/inc/parser/parser_links.test.php b/_test/cases/inc/parser/parser_links.test.php index c98296bfd..7bd0e7f16 100644 --- a/_test/cases/inc/parser/parser_links.test.php +++ b/_test/cases/inc/parser/parser_links.test.php @@ -97,6 +97,21 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); } + function testEmailRFC2822() { + $this->P->addMode('emaillink',new Doku_Parser_Mode_Emaillink()); + $this->P->parse("Foo <~fix+bug's.for/ev{e}r@php.net> Bar"); + $calls = array ( + array('document_start',array()), + array('p_open',array()), + array('cdata',array("\n".'Foo ')), + array('emaillink',array("~fix+bug's.for/ev{e}r@php.net", NULL)), + array('cdata',array(' Bar'."\n")), + array('p_close',array()), + array('document_end',array()), + ); + $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + } + function testInternalLinkOneChar() { $this->P->addMode('internallink',new Doku_Parser_Mode_InternalLink()); $this->P->parse("Foo [[l]] Bar"); -- cgit v1.2.3