summaryrefslogtreecommitdiff
path: root/_test
diff options
context:
space:
mode:
authorChris Smith <chris.eureka@jalakai.co.uk>2009-03-08 05:12:59 +0100
committerChris Smith <chris.eureka@jalakai.co.uk>2009-03-08 05:12:59 +0100
commit7965a9cf734ed195b660cd3729439614dd03815f (patch)
tree2b4a0e91b7dd5b6bda14cbb872bd4b979b1d77e2 /_test
parent445e8084b0ae168ce8982503d16c69a64ebc5871 (diff)
downloadrpg-7965a9cf734ed195b660cd3729439614dd03815f.tar.gz
rpg-7965a9cf734ed195b660cd3729439614dd03815f.tar.bz2
add test case for FS#1609 patch (hex numbers shouldn't match multiply entity)
darcs-hash:20090308041259-f07c6-dcba687b160e30b2dbcfa02d4526c0a3adb4e324.gz
Diffstat (limited to '_test')
-rw-r--r--_test/cases/inc/parser/parser_replacements.test.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/_test/cases/inc/parser/parser_replacements.test.php b/_test/cases/inc/parser/parser_replacements.test.php
index 1534f9ce8..73d3bf59e 100644
--- a/_test/cases/inc/parser/parser_replacements.test.php
+++ b/_test/cases/inc/parser/parser_replacements.test.php
@@ -266,6 +266,22 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser {
$this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls);
}
+ function testMultiplyEntityHex() {
+ // the multiply entity pattern should not match hex numbers, eg. 0x123
+ $this->P->addMode('multiplyentity',new Doku_Parser_Mode_MultiplyEntity());
+ $this->P->parse('Foo 0x123 Bar');
+
+ $calls = array (
+ array('document_start',array()),
+ array('p_open',array()),
+ array('cdata',array("\n".'Foo 0x123 Bar'."\n")),
+ array('p_close',array()),
+ array('document_end',array()),
+ );
+
+ $this->assertEqual(array_map('stripbyteindex',$this->H->calls),$calls);
+ }
+
function testHR() {
$this->P->addMode('hr',new Doku_Parser_Mode_HR());
$this->P->parse("Foo \n ---- \n Bar");