From 0483f97f57369aa0b4ba028a881a78fda540d2a9 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 28 Jul 2012 15:41:53 +0200 Subject: added multiby html_highlight tests FS#2440 --- _test/tests/inc/html_hilight.test.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to '_test') 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> bar/', + html_hilight($html,'ДокуВики') + ); + } + + function testMBright() { + $html = 'foo ДокуВики bar'; + $this->assertRegExp( + '/foo Доку<\/span>Вики bar/', + html_hilight($html,'Доку*') + ); + } + + function testMBleft() { + $html = 'foo ДокуВики bar'; + $this->assertRegExp( + '/foo ДокуВики<\/span> bar/', + html_hilight($html,'*Вики') + ); + } + + function testMBboth() { + $html = 'foo ДокуВики bar'; + $this->assertRegExp( + '/foo ДокуВи<\/span>ки bar/', + html_hilight($html,'*куВи*') + ); + } } -- cgit v1.2.3