From 4257e493257c287ca1e7af5c673560cd0c0aabb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Thu, 27 Aug 2026 02:48:06 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=AA=20test(engine):=20let=20the=20canc?= =?UTF-8?q?el-walk=20test=20skip=20fixtures=20the=20video=20demuxer=20refu?= =?UTF-8?q?ses?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Matroska fixture sweep now also finds the audio-only test_ac3.mka, which sorts first and which MkvDemuxer::open rightly refuses -- the test panicked on its own expect before measuring anything. Take the first fixture the video demuxer accepts, the shape the cue-index sweep below already uses. --- crates/engine/src/demux.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/engine/src/demux.rs b/crates/engine/src/demux.rs index c8c1978..01dbe25 100644 --- a/crates/engine/src/demux.rs +++ b/crates/engine/src/demux.rs @@ -4201,12 +4201,16 @@ mod tests { /// about the file -- and the same walk without it still opens. #[test] fn a_cancelled_walk_gives_up_and_says_so() { - let Some(path) = matroska_fixtures().into_iter().next() else { + // The first fixture the *video* demuxer accepts: the sweep also finds + // audio-only `.mka`, which `MkvDemuxer::open` rightly refuses. + let Some((path, lazy)) = matroska_fixtures() + .into_iter() + .find_map(|p| MkvDemuxer::open(&p).ok().map(|(_, lazy)| (p, lazy))) + else { eprintln!("no Matroska fixture: the cancel walk is not measured"); return; }; let name = path.file_name().unwrap().to_string_lossy().into_owned(); - let (_, lazy) = MkvDemuxer::open(&path).expect(&name); let (segment, number) = (lazy.segment, lazy.number); let mut file = File::open(&path).expect(&name);