@@ -932,7 +932,7 @@ mod tests {
932
932
#[ test]
933
933
#[ cfg_attr( target_os = "android" , ignore) ]
934
934
fn smoke ( ) {
935
- let p = if cfg ! ( target_os = "windows" ) {
935
+ let p = if cfg ! ( target_os = "windows" ) {
936
936
Command :: new ( "cmd" ) . args ( & [ "/C" , "exit 0" ] ) . spawn ( )
937
937
} else {
938
938
Command :: new ( "true" ) . spawn ( )
@@ -954,7 +954,7 @@ mod tests {
954
954
#[ test]
955
955
#[ cfg_attr( target_os = "android" , ignore) ]
956
956
fn exit_reported_right ( ) {
957
- let p = if cfg ! ( target_os = "windows" ) {
957
+ let p = if cfg ! ( target_os = "windows" ) {
958
958
Command :: new ( "cmd" ) . args ( & [ "/C" , "exit 1" ] ) . spawn ( )
959
959
} else {
960
960
Command :: new ( "false" ) . spawn ( )
@@ -997,7 +997,7 @@ mod tests {
997
997
#[ test]
998
998
#[ cfg_attr( target_os = "android" , ignore) ]
999
999
fn stdout_works ( ) {
1000
- if cfg ! ( target_os = "windows" ) {
1000
+ if cfg ! ( target_os = "windows" ) {
1001
1001
let mut cmd = Command :: new ( "cmd" ) ;
1002
1002
cmd. args ( & [ "/C" , "echo foobar" ] ) . stdout ( Stdio :: piped ( ) ) ;
1003
1003
assert_eq ! ( run_output( cmd) , "foobar\r \n " ) ;
@@ -1065,14 +1065,14 @@ mod tests {
1065
1065
#[ test]
1066
1066
#[ cfg_attr( target_os = "android" , ignore) ]
1067
1067
fn test_process_status ( ) {
1068
- let mut status = if cfg ! ( target_os = "windows" ) {
1068
+ let mut status = if cfg ! ( target_os = "windows" ) {
1069
1069
Command :: new ( "cmd" ) . args ( & [ "/C" , "exit 1" ] ) . status ( ) . unwrap ( )
1070
1070
} else {
1071
1071
Command :: new ( "false" ) . status ( ) . unwrap ( )
1072
1072
} ;
1073
1073
assert ! ( status. code( ) == Some ( 1 ) ) ;
1074
1074
1075
- status = if cfg ! ( target_os = "windows" ) {
1075
+ status = if cfg ! ( target_os = "windows" ) {
1076
1076
Command :: new ( "cmd" ) . args ( & [ "/C" , "exit 0" ] ) . status ( ) . unwrap ( )
1077
1077
} else {
1078
1078
Command :: new ( "true" ) . status ( ) . unwrap ( )
@@ -1092,7 +1092,7 @@ mod tests {
1092
1092
#[ cfg_attr( target_os = "android" , ignore) ]
1093
1093
fn test_process_output_output ( ) {
1094
1094
let Output { status, stdout, stderr}
1095
- = if cfg ! ( target_os = "windows" ) {
1095
+ = if cfg ! ( target_os = "windows" ) {
1096
1096
Command :: new ( "cmd" ) . args ( & [ "/C" , "echo hello" ] ) . output ( ) . unwrap ( )
1097
1097
} else {
1098
1098
Command :: new ( "echo" ) . arg ( "hello" ) . output ( ) . unwrap ( )
@@ -1108,7 +1108,7 @@ mod tests {
1108
1108
#[ cfg_attr( target_os = "android" , ignore) ]
1109
1109
fn test_process_output_error ( ) {
1110
1110
let Output { status, stdout, stderr}
1111
- = if cfg ! ( target_os = "windows" ) {
1111
+ = if cfg ! ( target_os = "windows" ) {
1112
1112
Command :: new ( "cmd" ) . args ( & [ "/C" , "mkdir ." ] ) . output ( ) . unwrap ( )
1113
1113
} else {
1114
1114
Command :: new ( "mkdir" ) . arg ( "." ) . output ( ) . unwrap ( )
@@ -1122,7 +1122,7 @@ mod tests {
1122
1122
#[ test]
1123
1123
#[ cfg_attr( target_os = "android" , ignore) ]
1124
1124
fn test_finish_once ( ) {
1125
- let mut prog = if cfg ! ( target_os = "windows" ) {
1125
+ let mut prog = if cfg ! ( target_os = "windows" ) {
1126
1126
Command :: new ( "cmd" ) . args ( & [ "/C" , "exit 1" ] ) . spawn ( ) . unwrap ( )
1127
1127
} else {
1128
1128
Command :: new ( "false" ) . spawn ( ) . unwrap ( )
@@ -1133,7 +1133,7 @@ mod tests {
1133
1133
#[ test]
1134
1134
#[ cfg_attr( target_os = "android" , ignore) ]
1135
1135
fn test_finish_twice ( ) {
1136
- let mut prog = if cfg ! ( target_os = "windows" ) {
1136
+ let mut prog = if cfg ! ( target_os = "windows" ) {
1137
1137
Command :: new ( "cmd" ) . args ( & [ "/C" , "exit 1" ] ) . spawn ( ) . unwrap ( )
1138
1138
} else {
1139
1139
Command :: new ( "false" ) . spawn ( ) . unwrap ( )
@@ -1145,7 +1145,7 @@ mod tests {
1145
1145
#[ test]
1146
1146
#[ cfg_attr( target_os = "android" , ignore) ]
1147
1147
fn test_wait_with_output_once ( ) {
1148
- let prog = if cfg ! ( target_os = "windows" ) {
1148
+ let prog = if cfg ! ( target_os = "windows" ) {
1149
1149
Command :: new ( "cmd" ) . args ( & [ "/C" , "echo hello" ] ) . stdout ( Stdio :: piped ( ) ) . spawn ( ) . unwrap ( )
1150
1150
} else {
1151
1151
Command :: new ( "echo" ) . arg ( "hello" ) . stdout ( Stdio :: piped ( ) ) . spawn ( ) . unwrap ( )
0 commit comments