@@ -10,6 +10,7 @@ use crate::common::util::TestScenario;
1010use  crate :: common:: util:: UChild ; 
1111#[ cfg( unix) ]  
1212use  nix:: sys:: signal:: Signal ; 
13+ #[ cfg( feature = "echo" ) ]  
1314use  regex:: Regex ; 
1415use  std:: env; 
1516use  std:: path:: Path ; 
@@ -98,6 +99,7 @@ fn test_if_windows_batch_files_can_be_executed() {
9899    assert ! ( result. stdout_str( ) . contains( "Hello Windows World!" ) ) ; 
99100} 
100101
102+ #[ cfg( feature = "echo" ) ]  
101103#[ test]  
102104fn  test_debug_1 ( )  { 
103105    let  ts = TestScenario :: new ( util_name ! ( ) ) ; 
@@ -118,6 +120,7 @@ fn test_debug_1() {
118120    ) ; 
119121} 
120122
123+ #[ cfg( feature = "echo" ) ]  
121124#[ test]  
122125fn  test_debug_2 ( )  { 
123126    let  ts = TestScenario :: new ( util_name ! ( ) ) ; 
@@ -144,6 +147,7 @@ fn test_debug_2() {
144147    ) ; 
145148} 
146149
150+ #[ cfg( feature = "echo" ) ]  
147151#[ test]  
148152fn  test_debug1_part_of_string_arg ( )  { 
149153    let  ts = TestScenario :: new ( util_name ! ( ) ) ; 
@@ -165,6 +169,7 @@ fn test_debug1_part_of_string_arg() {
165169    ) ; 
166170} 
167171
172+ #[ cfg( feature = "echo" ) ]  
168173#[ test]  
169174fn  test_debug2_part_of_string_arg ( )  { 
170175    let  ts = TestScenario :: new ( util_name ! ( ) ) ; 
@@ -651,7 +656,7 @@ fn test_env_with_empty_executable_double_quotes() {
651656} 
652657
653658#[ test]  
654- #[ cfg( unix) ]  
659+ #[ cfg( all ( unix,  feature =  "dirname" ,  feature =  "echo" ) ) ]  
655660fn  test_env_overwrite_arg0 ( )  { 
656661    let  ts = TestScenario :: new ( util_name ! ( ) ) ; 
657662
@@ -675,7 +680,7 @@ fn test_env_overwrite_arg0() {
675680} 
676681
677682#[ test]  
678- #[ cfg( unix) ]  
683+ #[ cfg( all ( unix,  feature =  "echo" ) ) ]  
679684fn  test_env_arg_argv0_overwrite ( )  { 
680685    let  ts = TestScenario :: new ( util_name ! ( ) ) ; 
681686
@@ -723,7 +728,7 @@ fn test_env_arg_argv0_overwrite() {
723728} 
724729
725730#[ test]  
726- #[ cfg( unix) ]  
731+ #[ cfg( all ( unix,  feature =  "echo" ) ) ]  
727732fn  test_env_arg_argv0_overwrite_mixed_with_string_args ( )  { 
728733    let  ts = TestScenario :: new ( util_name ! ( ) ) ; 
729734
0 commit comments