@@ -236,12 +236,15 @@ mod tests {
236236 fb. write_all ( & bet[ ..] ) . unwrap ( ) ;
237237 let _ = fa;
238238 let _ = fb;
239- let output = Command :: new ( "ed" )
240- . arg ( & format ! ( "{target}/alef" ) )
241- . stdin ( File :: open ( "target/ab.ed" ) . unwrap ( ) )
242- . output ( )
243- . unwrap ( ) ;
244- assert ! ( output. status. success( ) , "{output:?}" ) ;
239+ #[ cfg( not( windows) ) ] // there's no ed on windows
240+ {
241+ let output = Command :: new ( "ed" )
242+ . arg ( & format ! ( "{target}/alef" ) )
243+ . stdin ( File :: open ( "target/ab.ed" ) . unwrap ( ) )
244+ . output ( )
245+ . unwrap ( ) ;
246+ assert ! ( output. status. success( ) , "{output:?}" ) ;
247+ }
245248 //println!("{}", String::from_utf8_lossy(&output.stdout));
246249 //println!("{}", String::from_utf8_lossy(&output.stderr));
247250 let alef = fs:: read ( & format ! ( "{target}/alef" ) ) . unwrap ( ) ;
@@ -307,12 +310,15 @@ mod tests {
307310 fb. write_all ( & bet[ ..] ) . unwrap ( ) ;
308311 let _ = fa;
309312 let _ = fb;
310- let output = Command :: new ( "ed" )
311- . arg ( "target/alef_" )
312- . stdin ( File :: open ( "target/ab_.ed" ) . unwrap ( ) )
313- . output ( )
314- . unwrap ( ) ;
315- assert ! ( output. status. success( ) , "{output:?}" ) ;
313+ #[ cfg( not( windows) ) ] // there's no ed on windows
314+ {
315+ let output = Command :: new ( "ed" )
316+ . arg ( "target/alef_" )
317+ . stdin ( File :: open ( "target/ab_.ed" ) . unwrap ( ) )
318+ . output ( )
319+ . unwrap ( ) ;
320+ assert ! ( output. status. success( ) , "{output:?}" ) ;
321+ }
316322 //println!("{}", String::from_utf8_lossy(&output.stdout));
317323 //println!("{}", String::from_utf8_lossy(&output.stderr));
318324 let alef = fs:: read ( "target/alef_" ) . unwrap ( ) ;
@@ -384,12 +390,15 @@ mod tests {
384390 fb. write_all ( & bet[ ..] ) . unwrap ( ) ;
385391 let _ = fa;
386392 let _ = fb;
387- let output = Command :: new ( "ed" )
388- . arg ( & format ! ( "{target}/alefr" ) )
389- . stdin ( File :: open ( "target/abr.ed" ) . unwrap ( ) )
390- . output ( )
391- . unwrap ( ) ;
392- assert ! ( output. status. success( ) , "{output:?}" ) ;
393+ #[ cfg( not( windows) ) ] // there's no ed on windows
394+ {
395+ let output = Command :: new ( "ed" )
396+ . arg ( & format ! ( "{target}/alefr" ) )
397+ . stdin ( File :: open ( "target/abr.ed" ) . unwrap ( ) )
398+ . output ( )
399+ . unwrap ( ) ;
400+ assert ! ( output. status. success( ) , "{output:?}" ) ;
401+ }
393402 //println!("{}", String::from_utf8_lossy(&output.stdout));
394403 //println!("{}", String::from_utf8_lossy(&output.stderr));
395404 let alef = fs:: read ( & format ! ( "{target}/alefr" ) ) . unwrap ( ) ;
0 commit comments