@@ -24,7 +24,7 @@ use crate::common::TestEnvironment;
2424use crate :: common:: to_toml_value;
2525
2626fn set_up_fake_formatter ( test_env : & TestEnvironment , args : & [ & str ] ) {
27- let formatter_path = assert_cmd:: cargo:: cargo_bin ( "fake-formatter" ) ;
27+ let formatter_path = assert_cmd:: cargo:: cargo_bin! ( "fake-formatter" ) ;
2828 assert ! ( formatter_path. is_file( ) ) ;
2929 test_env. add_config ( formatdoc ! { "
3030 [fix.tools.fake-formatter]
@@ -68,7 +68,7 @@ fn test_config_multiple_tools() {
6868 let test_env = TestEnvironment :: default ( ) ;
6969 test_env. run_jj_in ( "." , [ "git" , "init" , "repo" ] ) . success ( ) ;
7070 let work_dir = test_env. work_dir ( "repo" ) ;
71- let formatter_path = assert_cmd:: cargo:: cargo_bin ( "fake-formatter" ) ;
71+ let formatter_path = assert_cmd:: cargo:: cargo_bin! ( "fake-formatter" ) ;
7272 assert ! ( formatter_path. is_file( ) ) ;
7373 let formatter = to_toml_value ( formatter_path. to_str ( ) . unwrap ( ) ) ;
7474 test_env. add_config ( format ! (
@@ -111,7 +111,7 @@ fn test_config_multiple_tools_with_same_name() {
111111 let mut test_env = TestEnvironment :: default ( ) ;
112112 test_env. run_jj_in ( "." , [ "git" , "init" , "repo" ] ) . success ( ) ;
113113 let work_dir = test_env. work_dir ( "repo" ) ;
114- let formatter_path = assert_cmd:: cargo:: cargo_bin ( "fake-formatter" ) ;
114+ let formatter_path = assert_cmd:: cargo:: cargo_bin! ( "fake-formatter" ) ;
115115 assert ! ( formatter_path. is_file( ) ) ;
116116 let formatter = to_toml_value ( formatter_path. to_str ( ) . unwrap ( ) ) ;
117117
@@ -167,7 +167,7 @@ fn test_config_disabled_tools() {
167167 let test_env = TestEnvironment :: default ( ) ;
168168 test_env. run_jj_in ( "." , [ "git" , "init" , "repo" ] ) . success ( ) ;
169169 let work_dir = test_env. work_dir ( "repo" ) ;
170- let formatter_path = assert_cmd:: cargo:: cargo_bin ( "fake-formatter" ) ;
170+ let formatter_path = assert_cmd:: cargo:: cargo_bin! ( "fake-formatter" ) ;
171171 assert ! ( formatter_path. is_file( ) ) ;
172172 let formatter = to_toml_value ( formatter_path. to_str ( ) . unwrap ( ) ) ;
173173 test_env. add_config ( format ! (
@@ -217,7 +217,7 @@ fn test_config_disabled_tools_warning_when_all_tools_are_disabled() {
217217 let test_env = TestEnvironment :: default ( ) ;
218218 test_env. run_jj_in ( "." , [ "git" , "init" , "repo" ] ) . success ( ) ;
219219 let work_dir = test_env. work_dir ( "repo" ) ;
220- let formatter_path = assert_cmd:: cargo:: cargo_bin ( "fake-formatter" ) ;
220+ let formatter_path = assert_cmd:: cargo:: cargo_bin! ( "fake-formatter" ) ;
221221 assert ! ( formatter_path. is_file( ) ) ;
222222 let formatter = to_toml_value ( formatter_path. to_str ( ) . unwrap ( ) ) ;
223223 test_env. add_config ( format ! (
@@ -246,7 +246,7 @@ fn test_config_tables_overlapping_patterns() {
246246 let test_env = TestEnvironment :: default ( ) ;
247247 test_env. run_jj_in ( "." , [ "git" , "init" , "repo" ] ) . success ( ) ;
248248 let work_dir = test_env. work_dir ( "repo" ) ;
249- let formatter_path = assert_cmd:: cargo:: cargo_bin ( "fake-formatter" ) ;
249+ let formatter_path = assert_cmd:: cargo:: cargo_bin! ( "fake-formatter" ) ;
250250 assert ! ( formatter_path. is_file( ) ) ;
251251 let formatter = to_toml_value ( formatter_path. to_str ( ) . unwrap ( ) ) ;
252252
@@ -327,7 +327,7 @@ fn test_config_tables_some_commands_missing() {
327327 let test_env = TestEnvironment :: default ( ) ;
328328 test_env. run_jj_in ( "." , [ "git" , "init" , "repo" ] ) . success ( ) ;
329329 let work_dir = test_env. work_dir ( "repo" ) ;
330- let formatter_path = assert_cmd:: cargo:: cargo_bin ( "fake-formatter" ) ;
330+ let formatter_path = assert_cmd:: cargo:: cargo_bin! ( "fake-formatter" ) ;
331331 assert ! ( formatter_path. is_file( ) ) ;
332332 let formatter = to_toml_value ( formatter_path. to_str ( ) . unwrap ( ) ) ;
333333 test_env. add_config ( format ! (
@@ -367,7 +367,7 @@ fn test_config_tables_empty_patterns_list() {
367367 let test_env = TestEnvironment :: default ( ) ;
368368 test_env. run_jj_in ( "." , [ "git" , "init" , "repo" ] ) . success ( ) ;
369369 let work_dir = test_env. work_dir ( "repo" ) ;
370- let formatter_path = assert_cmd:: cargo:: cargo_bin ( "fake-formatter" ) ;
370+ let formatter_path = assert_cmd:: cargo:: cargo_bin! ( "fake-formatter" ) ;
371371 assert ! ( formatter_path. is_file( ) ) ;
372372 let formatter = to_toml_value ( formatter_path. to_str ( ) . unwrap ( ) ) ;
373373 test_env. add_config ( format ! (
@@ -400,7 +400,7 @@ fn test_config_filesets() {
400400 let test_env = TestEnvironment :: default ( ) ;
401401 test_env. run_jj_in ( "." , [ "git" , "init" , "repo" ] ) . success ( ) ;
402402 let work_dir = test_env. work_dir ( "repo" ) ;
403- let formatter_path = assert_cmd:: cargo:: cargo_bin ( "fake-formatter" ) ;
403+ let formatter_path = assert_cmd:: cargo:: cargo_bin! ( "fake-formatter" ) ;
404404 assert ! ( formatter_path. is_file( ) ) ;
405405 let formatter = to_toml_value ( formatter_path. to_str ( ) . unwrap ( ) ) ;
406406 test_env. add_config ( format ! (
@@ -447,7 +447,7 @@ fn test_relative_paths() {
447447 let test_env = TestEnvironment :: default ( ) ;
448448 test_env. run_jj_in ( "." , [ "git" , "init" , "repo" ] ) . success ( ) ;
449449 let work_dir = test_env. work_dir ( "repo" ) ;
450- let formatter_path = assert_cmd:: cargo:: cargo_bin ( "fake-formatter" ) ;
450+ let formatter_path = assert_cmd:: cargo:: cargo_bin! ( "fake-formatter" ) ;
451451 assert ! ( formatter_path. is_file( ) ) ;
452452 let formatter = to_toml_value ( formatter_path. to_str ( ) . unwrap ( ) ) ;
453453 test_env. add_config ( format ! (
@@ -519,11 +519,11 @@ fn test_relative_tool_path_from_subdirectory() {
519519 let work_dir = test_env. work_dir ( "repo" ) ;
520520
521521 // Copy the fake-formatter into the workspace as a relative tool
522- let formatter_path = assert_cmd:: cargo:: cargo_bin ( "fake-formatter" ) ;
522+ let formatter_path = assert_cmd:: cargo:: cargo_bin! ( "fake-formatter" ) ;
523523 let formatter_name = formatter_path. file_name ( ) . unwrap ( ) . to_str ( ) . unwrap ( ) ;
524524 let tool_dir = work_dir. create_dir ( "tools" ) ;
525525 let workspace_formatter_path = tool_dir. root ( ) . join ( formatter_name) ;
526- std:: fs:: copy ( & formatter_path, & workspace_formatter_path) . unwrap ( ) ;
526+ std:: fs:: copy ( formatter_path, & workspace_formatter_path) . unwrap ( ) ;
527527 work_dir. write_file ( ".gitignore" , "tools/\n " ) ;
528528 let formatter_relative_path = PathBuf :: from_iter ( [ "$root" , "tools" , formatter_name] ) ;
529529 test_env. add_config ( format ! (
@@ -1410,7 +1410,7 @@ fn test_all_files() {
14101410 let test_env = TestEnvironment :: default ( ) ;
14111411 test_env. run_jj_in ( "." , [ "git" , "init" , "repo" ] ) . success ( ) ;
14121412 let work_dir = test_env. work_dir ( "repo" ) ;
1413- let formatter_path = assert_cmd:: cargo:: cargo_bin ( "fake-formatter" ) ;
1413+ let formatter_path = assert_cmd:: cargo:: cargo_bin! ( "fake-formatter" ) ;
14141414 assert ! ( formatter_path. is_file( ) ) ;
14151415 let formatter = to_toml_value ( formatter_path. to_str ( ) . unwrap ( ) ) ;
14161416
0 commit comments