Dependency switch #13

Merged
phoenix merged 7 commits from switch_dependency into devel 2025-04-12 19:21:59 +00:00
Showing only changes of commit a30445f634 - Show all commits

View File

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