Add config printing, explain mode, completions, and docs
This commit is contained in:
27
src/parse.rs
27
src/parse.rs
@@ -150,4 +150,31 @@ mod tests {
|
||||
assert_eq!(hints.title.as_deref(), Some("Zootopia Vlix"));
|
||||
assert!(hints.alt_titles.iter().any(|t| t == "Zootopia"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn handles_foreign_title_ascii() {
|
||||
let path = Path::new("Cidade.de.Deus.2002.1080p.BluRay.x264.mkv");
|
||||
let hints = parse_filename(path);
|
||||
assert_eq!(hints.title.as_deref(), Some("Cidade de Deus"));
|
||||
assert_eq!(hints.year, Some(2002));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn strips_release_tags() {
|
||||
let path = Path::new("Movie.Title.2019.1080p.HDRip.x264.AAC.mkv");
|
||||
let hints = parse_filename(path);
|
||||
assert_eq!(hints.title.as_deref(), Some("Movie Title"));
|
||||
assert_eq!(hints.year, Some(2019));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn handles_subtitle_separator() {
|
||||
let path = Path::new("Doctor.Strange.In.The.Multiverse.of.Madness.2022.2160p.mkv");
|
||||
let hints = parse_filename(path);
|
||||
assert_eq!(
|
||||
hints.title.as_deref(),
|
||||
Some("Doctor Strange In The Multiverse of Madness")
|
||||
);
|
||||
assert_eq!(hints.year, Some(2022));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user