Refactor
All checks were successful
Rust Build / Check (pull_request) Successful in 41s
Rust Build / Test Suite (pull_request) Successful in 45s
Rust Build / Rustfmt (pull_request) Successful in 34s
Rust Build / Clippy (pull_request) Successful in 49s
Rust Build / build (pull_request) Successful in 54s

This commit is contained in:
2025-04-12 15:17:20 -04:00
parent 8f2f88669d
commit a30445f634

View File

@@ -90,21 +90,19 @@ mod tests {
let dir_path = std::path::Path::new(&directory);
Ok(dir_path.join(filename))
}
pub fn test_file_directory() -> String {
String::from("tests/sample_tracks3")
}
}
#[test]
fn test_get_title() {
let filename = String::from("track01.flac");
let dir = String::from("tests/sample_tracks3");
// let dir_path = std::path::Path::new(&dir);
// let full_path = dir_path.join(filename);
let dir = util::test_file_directory();
// println!("Path: {:?}", full_path);
// assert!(full_path.exists(), "Path does not exists {:?}", full_path);
match file_exists(&dir, &filename) {
Ok(_) => {
// let filepath = full_path.display().to_string();
let filepath = get_full_path(&dir, &filename).unwrap();
match meta_next::get_meta(meta_type::Type::Title, &filepath) {