added multiby html_highlight tests FS#2440

This commit is contained in:
Andreas Gohr 2012-07-28 15:41:53 +02:00
parent ff10b24054
commit 0483f97f57

View file

@ -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,'*куВи*')
);
}
}