jquery-ui/tests/autocomplete.js
Paul Bakaus 4e06fa6304 - removed 1.6 branch
- changed version in tags/1.5.2 to 1.5.2
- merged trunk with 1.6
2008-07-09 11:09:40 +00:00

7 lines
548 B
JavaScript

test("highlighter", function() {
equals( jQuery.Autocompleter.defaults.highlight("Peter", "Pe"), "<strong>Pe</strong>ter" );
equals( jQuery.Autocompleter.defaults.highlight("Peter <em>&lt;Pan&gt;</em>", "Pe"), "<strong>Pe</strong>ter <em>&lt;Pan&gt;</em>" );
equals( jQuery.Autocompleter.defaults.highlight("Peter <em>&lt;Pan&gt;</em>", "a"), "Peter <em>&lt;P<strong>a</strong>n&gt;</em>" );
equals( jQuery.Autocompleter.defaults.highlight("Peter <em>(&lt;Pan&gt;)</em>", "(&lt;P"), "Peter <em><strong>(&lt;P</strong>an&gt;)</em>" );
});