Index: trunk/phase3/tests/qunit/index.html |
— | — | @@ -44,6 +44,7 @@ |
45 | 45 | <script src="../../resources/jquery/jquery.byteLimit.js"></script> |
46 | 46 | <script src="../../resources/jquery/jquery.colorUtil.js"></script> |
47 | 47 | <script src="../../resources/jquery/jquery.getAttrs.js"></script> |
| 48 | + <script src="../../resources/jquery/jquery.highlightText.js"></script> |
48 | 49 | <script src="../../resources/jquery/jquery.localize.js"></script> |
49 | 50 | <script src="../../resources/jquery/jquery.tabIndex.js"></script> |
50 | 51 | <script src="../../resources/jquery/jquery.tablesorter.js"></script> |
— | — | @@ -71,6 +72,7 @@ |
72 | 73 | <script src="suites/resources/jquery/jquery.byteLimit.test.js"></script> |
73 | 74 | <script src="suites/resources/jquery/jquery.colorUtil.test.js"></script> |
74 | 75 | <script src="suites/resources/jquery/jquery.getAttrs.test.js"></script> |
| 76 | + <script src="suites/resources/jquery/jquery.highlightText.test.js"></script> |
75 | 77 | <script src="suites/resources/jquery/jquery.localize.test.js"></script> |
76 | 78 | <script src="suites/resources/jquery/jquery.tabIndex.test.js"></script> |
77 | 79 | <script src="suites/resources/jquery/jquery.tablesorter.test.js" charset="UTF-8"></script> |
Index: trunk/phase3/tests/qunit/suites/resources/jquery/jquery.highlightText.test.js |
— | — | @@ -0,0 +1,37 @@ |
| 2 | +module( 'jquery.highlightText' ); |
| 3 | + |
| 4 | +test( '-- Initial check', function() { |
| 5 | + expect(1); |
| 6 | + ok( $.fn.highlightText, 'jQuery.fn.highlightText defined' ); |
| 7 | +} ); |
| 8 | + |
| 9 | +test( 'Check', function() { |
| 10 | + expect(3); |
| 11 | + var $fixture; |
| 12 | + |
| 13 | + $fixture = $( '<p>Blue Öyster Cult</p>' ); |
| 14 | + $fixture.highlightText( 'Blue' ); |
| 15 | + equal( |
| 16 | + '<span class="highlight">Blue</span> Öyster Cult', |
| 17 | + $fixture.html() |
| 18 | + ); |
| 19 | + |
| 20 | + $fixture = $( '<p>Österreich</p>' ); |
| 21 | + $fixture.highlightText( 'Österreich' ); |
| 22 | + equal( |
| 23 | + '<span class="highlight">Österreich</span>', |
| 24 | + $fixture.html() |
| 25 | + ); |
| 26 | + |
| 27 | + /** |
| 28 | + * Highlighter broken on punctuation mark. |
| 29 | + */ |
| 30 | + /** |
| 31 | + $fixture = $( '<p>So good. To be there</p>' ); |
| 32 | + $fixture.highlightText( 'good' ); |
| 33 | + equal( |
| 34 | + 'So <span class="highlight">good</span>. To be there', |
| 35 | + $fixture.html() |
| 36 | + ); |
| 37 | + */ |
| 38 | +} ); |
Property changes on: trunk/phase3/tests/qunit/suites/resources/jquery/jquery.highlightText.test.js |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 39 | + native |