(#[case] tmp_cache_folder_name: String)
| 28 | #[case("../áèîö")] |
| 29 | #[case("../テスト")] |
| 30 | fn cache_path_test(#[case] tmp_cache_folder_name: String) { |
| 31 | let mut cmd = get_selenium_manager(); |
| 32 | cmd.env_remove("SE_CACHE_PATH"); |
| 33 | cmd.args([ |
| 34 | "--browser", |
| 35 | "chrome", |
| 36 | "--cache-path", |
| 37 | &tmp_cache_folder_name, |
| 38 | "--output", |
| 39 | "json", |
| 40 | ]) |
| 41 | .assert() |
| 42 | .success() |
| 43 | .code(0); |
| 44 | |
| 45 | let driver_path = get_driver_path(&mut cmd); |
| 46 | println!("*** Custom cache path: {}", driver_path); |
| 47 | assert!(!driver_path.contains(r"cache\selenium")); |
| 48 | |
| 49 | let tmp_cache_path = Path::new(&tmp_cache_folder_name); |
| 50 | fs::remove_dir_all(tmp_cache_path).unwrap(); |
| 51 | assert!(!tmp_cache_path.exists()); |
| 52 | } |
nothing calls this directly
no test coverage detected