Add test for stripping carriage returns.
Showing
1 changed file
with
17 additions
and
0 deletions
... | @@ -206,6 +206,23 @@ | ... | @@ -206,6 +206,23 @@ |
206 | manifest.substring(manifest.indexOf(',') + 1, manifest.length - 1), | 206 | manifest.substring(manifest.indexOf(',') + 1, manifest.length - 1), |
207 | 'the title is parsed'); | 207 | 'the title is parsed'); |
208 | }); | 208 | }); |
209 | test('parses #EXTINF tags with carriage returns', function() { | ||
210 | var | ||
211 | manifest = '#EXTINF:13,Does anyone really use the title attribute?\r\n', | ||
212 | element; | ||
213 | parseStream.on('data', function(elem) { | ||
214 | element = elem; | ||
215 | }); | ||
216 | lineStream.push(manifest); | ||
217 | |||
218 | ok(element, 'an event was triggered'); | ||
219 | strictEqual(element.type, 'tag', 'the line type is tag'); | ||
220 | strictEqual(element.tagType, 'inf', 'the tag type is inf'); | ||
221 | strictEqual(element.duration, 13, 'the duration is parsed'); | ||
222 | strictEqual(element.title, | ||
223 | manifest.substring(manifest.indexOf(',') + 1, manifest.length - 2), | ||
224 | 'the title is parsed'); | ||
225 | }); | ||
209 | 226 | ||
210 | // #EXT-X-TARGETDURATION | 227 | // #EXT-X-TARGETDURATION |
211 | test('parses minimal #EXT-X-TARGETDURATION tags', function() { | 228 | test('parses minimal #EXT-X-TARGETDURATION tags', function() { | ... | ... |
-
Please register or sign in to post a comment