11use std:: error:: Error ;
2- use std:: path:: { Path , PathBuf } ;
2+ use std:: path:: Path ;
33
44mod common;
55use common:: { build_run_config, git_add_all_files, setup_fixture_repo} ;
@@ -18,7 +18,7 @@ fn test_run_config_executable_path_overrides_config_file() -> Result<(), Box<dyn
1818
1919 let mut run_config = build_run_config ( project_path, ".github/CODEOWNERS" ) ;
2020 // Use a relative path that gets displayed as-is in error messages
21- run_config. executable_path = Some ( PathBuf :: from ( "my-wrapper-tool" ) ) ;
21+ run_config. executable_path = Some ( "my-wrapper-tool" . to_string ( ) ) ;
2222
2323 let result = validate ( & run_config, vec ! [ ] ) ;
2424
@@ -78,7 +78,7 @@ fn test_run_config_executable_path_overrides_default() -> Result<(), Box<dyn Err
7878 // This fixture has NO executable_name in config (uses default "codeowners")
7979
8080 let mut run_config = build_run_config ( project_path, ".github/CODEOWNERS" ) ;
81- run_config. executable_path = Some ( PathBuf :: from ( "custom-command" ) ) ;
81+ run_config. executable_path = Some ( "custom-command" . to_string ( ) ) ;
8282
8383 let result = validate ( & run_config, vec ! [ ] ) ;
8484
@@ -97,31 +97,3 @@ fn test_run_config_executable_path_overrides_default() -> Result<(), Box<dyn Err
9797
9898 Ok ( ( ) )
9999}
100-
101- #[ test]
102- fn test_executable_name_extraction_from_path ( ) {
103- use codeowners:: runner:: RunConfig ;
104-
105- let mut run_config = RunConfig {
106- project_root : PathBuf :: from ( "." ) ,
107- codeowners_file_path : PathBuf :: from ( ".github/CODEOWNERS" ) ,
108- config_path : PathBuf :: from ( "config/code_ownership.yml" ) ,
109- no_cache : true ,
110- executable_path : None ,
111- } ;
112-
113- // Test with None
114- assert_eq ! ( run_config. executable_name( ) , None ) ;
115-
116- // Test with simple path (no directory component)
117- run_config. executable_path = Some ( PathBuf :: from ( "codeowners" ) ) ;
118- assert_eq ! ( run_config. executable_name( ) , Some ( "codeowners" . to_string( ) ) ) ;
119-
120- // Test with relative path - returns full relative path string
121- run_config. executable_path = Some ( PathBuf :: from ( "bin/codeownership" ) ) ;
122- assert_eq ! ( run_config. executable_name( ) , Some ( "bin/codeownership" . to_string( ) ) ) ;
123-
124- // Test with another relative path
125- run_config. executable_path = Some ( PathBuf :: from ( "tools/my-tool" ) ) ;
126- assert_eq ! ( run_config. executable_name( ) , Some ( "tools/my-tool" . to_string( ) ) ) ;
127- }
0 commit comments