Index: trunk/phase3/tests/qunit/suites/resources/jquery/jquery.highlightText.test.js |
— | — | @@ -8,110 +8,154 @@ |
9 | 9 | test( 'Check', function() { |
10 | 10 | var cases = [ |
11 | 11 | { |
| 12 | + desc: 'Test 001', |
12 | 13 | text: 'Blue Öyster Cult', |
13 | 14 | highlight: 'Blue', |
14 | 15 | expected: '<span class="highlight">Blue</span> Öyster Cult' |
15 | 16 | }, |
16 | 17 | { |
| 18 | + desc: 'Test 002', |
17 | 19 | text: 'Blue Öyster Cult', |
18 | 20 | highlight: 'Blue ', |
19 | 21 | expected: '<span class="highlight">Blue</span> Öyster Cult' |
20 | 22 | }, |
21 | 23 | { |
| 24 | + desc: 'Test 003', |
22 | 25 | text: 'Blue Öyster Cult', |
23 | 26 | highlight: 'Blue Ö', |
24 | 27 | expected: '<span class="highlight">Blue</span> <span class="highlight">Ö</span>yster Cult' |
25 | 28 | }, |
26 | 29 | { |
| 30 | + desc: 'Test 004', |
27 | 31 | text: 'Blue Öyster Cult', |
28 | 32 | highlight: 'Blue Öy', |
29 | 33 | expected: '<span class="highlight">Blue</span> <span class="highlight">Öy</span>ster Cult' |
30 | 34 | }, |
31 | 35 | { |
| 36 | + desc: 'Test 005', |
32 | 37 | text: 'Blue Öyster Cult', |
33 | 38 | highlight: ' Blue', |
34 | 39 | expected: '<span class="highlight">Blue</span> Öyster Cult' |
35 | 40 | }, |
36 | 41 | { |
| 42 | + desc: 'Test 006', |
37 | 43 | text: 'Blue Öyster Cult', |
38 | 44 | highlight: ' Blue ', |
39 | 45 | expected: '<span class="highlight">Blue</span> Öyster Cult' |
40 | 46 | }, |
41 | 47 | { |
| 48 | + desc: 'Test 007', |
42 | 49 | text: 'Blue Öyster Cult', |
43 | 50 | highlight: ' Blue Ö', |
44 | 51 | expected: '<span class="highlight">Blue</span> <span class="highlight">Ö</span>yster Cult' |
45 | 52 | }, |
46 | 53 | { |
| 54 | + desc: 'Test 008', |
47 | 55 | text: 'Blue Öyster Cult', |
48 | 56 | highlight: ' Blue Öy', |
49 | 57 | expected: '<span class="highlight">Blue</span> <span class="highlight">Öy</span>ster Cult' |
50 | 58 | }, |
51 | 59 | { |
52 | | - desc: 'Highlighter broken on starting Umlaut?', |
| 60 | + desc: 'Test 009: Highlighter broken on starting Umlaut?', |
53 | 61 | text: 'Österreich', |
54 | 62 | highlight: 'Österreich', |
55 | 63 | expected: '<span class="highlight">Österreich</span>' |
56 | 64 | }, |
57 | 65 | { |
58 | | - desc: 'Highlighter broken on starting Umlaut?', |
| 66 | + desc: 'Test 010: Highlighter broken on starting Umlaut?', |
59 | 67 | text: 'Österreich', |
60 | 68 | highlight: 'Ö', |
61 | | - expected: '<span class="highlight">Ö</span>sterreich</span>' |
| 69 | + expected: '<span class="highlight">Ö</span>sterreich' |
62 | 70 | }, |
63 | 71 | { |
64 | | - desc: 'Highlighter broken on starting Umlaut?', |
| 72 | + desc: 'Test 011: Highlighter broken on starting Umlaut?', |
65 | 73 | text: 'Österreich', |
66 | 74 | highlight: 'Öst', |
67 | 75 | expected: '<span class="highlight">Öst</span>erreich' |
68 | 76 | }, |
69 | 77 | { |
70 | | - desc: 'Highlighter broken on starting Umlaut?', |
| 78 | + desc: 'Test 012: Highlighter broken on starting Umlaut?', |
71 | 79 | text: 'Österreich', |
72 | 80 | highlight: 'Oe', |
73 | 81 | expected: 'Österreich' |
74 | 82 | }, |
75 | 83 | { |
76 | | - desc: 'Highlighter broken on punctuation mark?', |
| 84 | + desc: 'Test 013: Highlighter broken on punctuation mark?', |
77 | 85 | text: 'So good. To be there', |
78 | 86 | highlight: 'good', |
79 | 87 | expected: 'So <span class="highlight">good</span>. To be there' |
80 | 88 | }, |
81 | 89 | { |
82 | | - desc: 'Highlighter broken on space?', |
| 90 | + desc: 'Test 014: Highlighter broken on space?', |
83 | 91 | text: 'So good. To be there', |
84 | 92 | highlight: 'be', |
85 | 93 | expected: 'So good. To <span class="highlight">be</span> there' |
86 | 94 | }, |
87 | 95 | { |
88 | | - desc: 'Highlighter broken on space?', |
| 96 | + desc: 'Test 015: Highlighter broken on space?', |
89 | 97 | text: 'So good. To be there', |
90 | 98 | highlight: ' be', |
91 | 99 | expected: 'So good. To <span class="highlight">be</span> there' |
92 | 100 | }, |
93 | 101 | { |
94 | | - desc: 'Highlighter broken on space?', |
| 102 | + desc: 'Test 016: Highlighter broken on space?', |
95 | 103 | text: 'So good. To be there', |
96 | 104 | highlight: 'be ', |
97 | 105 | expected: 'So good. To <span class="highlight">be</span> there' |
98 | 106 | }, |
99 | 107 | { |
100 | | - desc: 'Highlighter broken on space?', |
| 108 | + desc: 'Test 017: Highlighter broken on space?', |
101 | 109 | text: 'So good. To be there', |
102 | 110 | highlight: ' be ', |
103 | 111 | expected: 'So good. To <span class="highlight">be</span> there' |
104 | 112 | }, |
105 | 113 | { |
106 | | - desc: 'Highlighter broken on special character at the end?', |
| 114 | + desc: 'Test 018: Highlighter broken on special character at the end?', |
107 | 115 | text: 'So good. xbß', |
108 | 116 | highlight: 'xbß', |
109 | 117 | expected: 'So good. <span class="highlight">xbß</span>' |
110 | 118 | }, |
111 | 119 | { |
112 | | - desc: 'Highlighter broken on special character at the end?', |
| 120 | + desc: 'Test 019: Highlighter broken on special character at the end?', |
113 | 121 | text: 'So good. xbß.', |
114 | 122 | highlight: 'xbß.', |
115 | 123 | expected: 'So good. <span class="highlight">xbß.</span>' |
| 124 | + }, |
| 125 | + { |
| 126 | + desc: 'Test 020: Hebrew', |
| 127 | + text: 'חסיד אומות העולם', |
| 128 | + highlight: 'חסיד אומות העולם', |
| 129 | + expected: '<span class="highlight">חסיד</span> <span class="highlight">אומות</span> <span class="highlight">העולם</span>' |
| 130 | + }, |
| 131 | + { |
| 132 | + desc: 'Test 021: Hebrew', |
| 133 | + text: 'חסיד אומות העולם', |
| 134 | + highlight: 'חסי', |
| 135 | + expected: '<span class="highlight">חסי</span>ד אומות העולם' |
| 136 | + }, |
| 137 | + { |
| 138 | + desc: 'Test 022: Japanese', |
| 139 | + text: '諸国民の中の正義の人', |
| 140 | + highlight: '諸国民の中の正義の人', |
| 141 | + expected: '<span class="highlight">諸国民の中の正義の人</span>' |
| 142 | + }, |
| 143 | + { |
| 144 | + desc: 'Test 023: Japanese', |
| 145 | + text: '諸国民の中の正義の人', |
| 146 | + highlight: '諸国', |
| 147 | + expected: '<span class="highlight">諸国</span>民の中の正義の人' |
| 148 | + }, |
| 149 | + { |
| 150 | + desc: 'Test 100: TESTCASE FOR QUNIT FAILS: a wrong expected string was not detected in Firefox 6.0 and Chrome', |
| 151 | + text: 'Österreich', |
| 152 | + highlight: 'Ö', |
| 153 | + expected: '<span class="highlight">Ö</span>sterreich</span this wrong tag is not detected as test failure in Firefox 6.0 or Chrome>' |
| 154 | + }, |
| 155 | + { |
| 156 | + desc: 'Test 101: TESTCASE FOR QUNIT FAILS: a wrong expected string was not detected in Firefox 6.0 or Chrome', |
| 157 | + text: 'Oesterreich', |
| 158 | + highlight: 'Oe', |
| 159 | + expected: '<span class="highlight">Oe</span>sterreich</span this wrong tag is not detected as test failure in Firefox 6.0 or Chrome>' |
116 | 160 | } |
117 | 161 | ]; |
118 | 162 | expect(cases.length); |