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