summaryrefslogtreecommitdiff
path: root/_test
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2012-07-28 15:41:53 +0200
committerAndreas Gohr <andi@splitbrain.org>2012-07-28 15:41:53 +0200
commit0483f97f57369aa0b4ba028a881a78fda540d2a9 (patch)
tree12df1d032d0d5d9eee44df82cca31eb9c897e5a7 /_test
parentff10b2405470c8c9c90a18830dafb641cdee70fe (diff)
downloadrpg-0483f97f57369aa0b4ba028a881a78fda540d2a9.tar.gz
rpg-0483f97f57369aa0b4ba028a881a78fda540d2a9.tar.bz2
added multiby html_highlight tests FS#2440
Diffstat (limited to '_test')
-rw-r--r--_test/tests/inc/html_hilight.test.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/_test/tests/inc/html_hilight.test.php b/_test/tests/inc/html_hilight.test.php
index bb0cdd424..fc4eced67 100644
--- a/_test/tests/inc/html_hilight.test.php
+++ b/_test/tests/inc/html_hilight.test.php
@@ -97,4 +97,36 @@ class html_hilight_test extends DokuWikiTest {
html_hilight($html,'x/')
);
}
+
+ function testMB() {
+ $html = 'foo ДокуВики bar';
+ $this->assertRegExp(
+ '/foo <span.*>ДокуВики<\/span> bar/',
+ html_hilight($html,'ДокуВики')
+ );
+ }
+
+ function testMBright() {
+ $html = 'foo ДокуВики bar';
+ $this->assertRegExp(
+ '/foo <span.*>Доку<\/span>Вики bar/',
+ html_hilight($html,'Доку*')
+ );
+ }
+
+ function testMBleft() {
+ $html = 'foo ДокуВики bar';
+ $this->assertRegExp(
+ '/foo Доку<span.*>Вики<\/span> bar/',
+ html_hilight($html,'*Вики')
+ );
+ }
+
+ function testMBboth() {
+ $html = 'foo ДокуВики bar';
+ $this->assertRegExp(
+ '/foo До<span.*>куВи<\/span>ки bar/',
+ html_hilight($html,'*куВи*')
+ );
+ }
}