Skip to content

Commit

Permalink
add test cache
Browse files Browse the repository at this point in the history
  • Loading branch information
biezhihua committed Jan 31, 2024
1 parent a54550f commit e6af5ff
Show file tree
Hide file tree
Showing 24 changed files with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion soda_resource_tools_lib/tests/integration_1_soda_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -536,9 +536,30 @@ mod soda_tests {
config
}

fn is_windows_os() -> bool {
return std::env::consts::OS == "windows";
}

fn is_linux_os() -> bool {
return std::env::consts::OS == "linux";
}

fn is_macos() -> bool {
return std::env::consts::OS == "macos";
}
fn default_lib_config() {
let mut config = soda::get_lib_config();
config.cache_path = tests_dir().join("test_cache").to_string_lossy().to_string();
if is_windows_os() {
config.cache_path = tests_dir().join("test_windows_cache").to_string_lossy().to_string();
}
if is_linux_os() {
config.cache_path = tests_dir().join("test_linux_cache").to_string_lossy().to_string();
}

if is_macos() {
config.cache_path = tests_dir().join("test_macos_cache").to_string_lossy().to_string();
}

config.metadata_skip_special = true;
config.transfer_rename_format_tv = "$title_cn$.$title_en$.$release_year$/$title_cn$.$title_en$.$year$.$season$.$resolution$.$source$.$video_codec$.$audio_codec$-$release_group$/$title_cn$.$title_en$.$year$.$season$$episode$.$resolution$.$source$.$video_codec$.$audio_codec$-$release_group$.$extension$".to_string();
config.transfer_rename_format_movie = "$title_cn$.$title_en$.$year$.$resolution$.$source$.$video_codec$.$audio_codec$/$title_cn$.$title_en$.$year$.$resolution$.$source$.$video_codec$.$audio_codec$.$extension$".to_string();
Expand Down

0 comments on commit e6af5ff

Please sign in to comment.