Index: trunk/parsers/wikidom/tests/annotations/test.js |
— | — | @@ -95,39 +95,33 @@ |
96 | 96 | content.remove( 5, 8 ); |
97 | 97 | } ); |
98 | 98 | |
99 | | -test( 'Content.substring', 5, function() { |
| 99 | +test( 'Content access', 8, function() { |
100 | 100 | equal( |
101 | 101 | content.substring( 3, 39 ), |
102 | 102 | 's is a test paragraph!\nParagraphs ca', |
103 | | - 'Returns correct plain text' |
| 103 | + 'Content.substring returns correct plain text when called with start and end arguments' |
104 | 104 | ); |
105 | 105 | equal( |
106 | 106 | content.substring( 39 ), |
107 | 107 | 'n have more than one line.', |
108 | | - 'Uses data length if end is not given' |
| 108 | + 'Content.substring uses data length if called without end argument' |
109 | 109 | ); |
110 | 110 | equal( |
111 | 111 | content.substring( -10, 10 ), |
112 | 112 | 'This is a ', |
113 | | - 'Clamps negetive start arguments' |
| 113 | + 'Content.substring clamps negetive start arguments' |
114 | 114 | ); |
115 | 115 | equal( |
116 | 116 | content.substring( 39, 100000000000 ), |
117 | 117 | 'n have more than one line.', |
118 | | - 'Clamps out of range end arguments' |
| 118 | + 'Content.substring clamps out of range end arguments' |
119 | 119 | ); |
120 | 120 | equal( |
121 | 121 | content.substring(), |
122 | 122 | 'This is a test paragraph!\nParagraphs can have more than one line.', |
123 | | - 'Called without arguments returns all text' |
| 123 | + 'Content.substring returns all text when called without arguments' |
124 | 124 | ); |
125 | | -} ); |
126 | | - |
127 | | -test( 'Content.getLength', 1, function() { |
128 | | - equal( content.getLength(), 65, 'Returns correct length' ); |
129 | | -} ); |
130 | | - |
131 | | -test( 'Content.slice', 2, function() { |
| 125 | + equal( content.getLength(), 65, 'Content.getLength returns correct length' ); |
132 | 126 | deepEqual( |
133 | 127 | content.slice().data, |
134 | 128 | [ |
— | — | @@ -197,7 +191,7 @@ |
198 | 192 | "e", |
199 | 193 | "." |
200 | 194 | ], |
201 | | - 'Called without arguments returns all data' |
| 195 | + 'Content.slice returns all data when called without arguments' |
202 | 196 | ); |
203 | 197 | deepEqual( |
204 | 198 | content.slice( 3, 10 ).data, |
— | — | @@ -210,6 +204,6 @@ |
211 | 205 | ["a", { "type": "xlink", "data": { "url":"http://www.a.com" } }], |
212 | 206 | [" ", { "type": "xlink", "data": { "url":"http://www.a.com" } }] |
213 | 207 | ], |
214 | | - 'Called with start and end returns range of data' |
| 208 | + 'Content.slice returns correct range of data when called with start and end arguments' |
215 | 209 | ); |
216 | 210 | } ); |