[feat] add tests for video file support in is_audio_file
; update TODOs to reflect completion
This commit is contained in:
2
TODO.md
2
TODO.md
@@ -10,7 +10,7 @@
|
|||||||
- [x] set speaker-names per input-file -> prompt user for each file if flag is set (--set-speaker-names)
|
- [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] fix cli output for model display
|
||||||
- [x] refactor into proper cli app
|
- [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
|
- detect gpus and use them
|
||||||
- add error handling
|
- add error handling
|
||||||
- add verbose flag (--verbose | -v) + add logging
|
- add verbose flag (--verbose | -v) + add logging
|
||||||
|
10
src/main.rs
10
src/main.rs
@@ -960,4 +960,14 @@ mod tests {
|
|||||||
std_env::remove_var("HOME");
|
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")));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user