File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 1717
1818use crate :: common:: get_driver_path;
1919use assert_cmd:: Command ;
20+ use rstest:: rstest;
2021use std:: fs;
2122use std:: path:: Path ;
2223
2324mod common;
2425
25- #[ test]
26- fn cache_path_test ( ) {
26+ #[ rstest]
27+ #[ case( "../tmp" ) ]
28+ #[ case( "../áèîö" ) ]
29+ #[ case( "../テスト" ) ]
30+ fn cache_path_test ( #[ case] tmp_cache_folder_name : String ) {
2731 let mut cmd = Command :: new ( env ! ( "CARGO_BIN_EXE_selenium-manager" ) ) ;
28- let tmp_cache_folder_name = "../tmp" ;
2932 cmd. args ( [
3033 "--browser" ,
3134 "chrome" ,
3235 "--cache-path" ,
33- tmp_cache_folder_name,
36+ & tmp_cache_folder_name,
3437 "--output" ,
3538 "json" ,
3639 ] )
@@ -42,7 +45,7 @@ fn cache_path_test() {
4245 println ! ( "*** Custom cache path: {}" , driver_path) ;
4346 assert ! ( !driver_path. contains( r"cache\selenium" ) ) ;
4447
45- let tmp_cache_path = Path :: new ( tmp_cache_folder_name) ;
48+ let tmp_cache_path = Path :: new ( & tmp_cache_folder_name) ;
4649 fs:: remove_dir_all ( tmp_cache_path) . unwrap ( ) ;
4750 assert ! ( !tmp_cache_path. exists( ) ) ;
4851}
You can’t perform that action at this time.
0 commit comments