[feat] add tests for video file support in is_audio_file; update TODOs to reflect completion

This commit is contained in:
2025-08-08 14:10:11 +02:00
parent 933d01d7ec
commit 7a6a313107
2 changed files with 11 additions and 1 deletions

View File

@@ -10,7 +10,7 @@
- [x] set speaker-names per input-file -> prompt user for each file if flag is set (--set-speaker-names)
- [x] fix cli output for model display
- [x] refactor into proper cli app
- add support for video files -> use ffmpeg to extract audio
- [x] add support for video files -> use ffmpeg to extract audio
- detect gpus and use them
- add error handling
- add verbose flag (--verbose | -v) + add logging

View File

@@ -960,4 +960,14 @@ mod tests {
std_env::remove_var("HOME");
}
}
#[test]
fn test_is_audio_file_includes_video_extensions() {
use std::path::Path;
assert!(is_audio_file(Path::new("video.mp4")));
assert!(is_audio_file(Path::new("clip.WEBM")));
assert!(is_audio_file(Path::new("movie.mkv")));
assert!(is_audio_file(Path::new("trailer.MOV")));
assert!(is_audio_file(Path::new("animation.avi")));
}
}