tests/playlist, tests/subtitle: comments: specs only

This commit is contained in:
4DBug committed 2026-11-01 01:49:12 -05:00
1 parent e0ab895027
commit 928ac9b39f
6 files changed
+10 -44

No files matched your search

+2 -4
View File
@@ -1,6 +1,5 @@
-- subtitle/vtt tests: ffmpeg's WebVTT output of a random script (times, text), a hand-written file with a header,
-- STYLE / REGION / NOTE blocks, ids, settings and hour timestamps against ffmpeg's SRT conversion of it, round trips
-- through the encoder, the contract and the fuzz pass. Fixtures: tools/fixtures/subtitles.py.
-- subtitle/vtt tests: ffmpeg's WebVTT output and a hand-written file against ffmpeg's SRT conversion.
-- Fixtures: tools/fixtures/subtitles.py.
local T = require("@tests/T")
local Vtt = require("@rosetta/subtitle/vtt")
local Bytes = require("@rosetta/core/Bytes")
@@ -76,7 +75,6 @@ do
local back = decode(buffer.tostring(Vtt.encode(v) :: buffer))
t:eq(back.meta.css[1], v.meta.css[1], "rt css")
t:eq(back.meta.regions[1], v.meta.regions[1], "rt region")
-- text that WebVTT cannot hold
local w = Vtt.encode({ kind = "subtitles", cues = { { start = 0, stop = 1, text = "a\n\nb --> c" } }, styles = {}, meta = {} } :: any) :: buffer
local wb = Vtt.decode(Bytes.reader(w))
t:eq(wb.cues[1].text, "a\nb --> c", "blank lines dropped, arrow escaped")