@@ -340,7 +340,6 @@ mod macros {
340
340
}
341
341
342
342
mod target_behavior {
343
- use super :: * ;
344
343
use super :: * ;
345
344
use libc:: { kill, SIGINT } ;
346
345
use posixutils_make:: parser:: parse:: ParseError ;
@@ -547,7 +546,7 @@ mod recipes {
547
546
548
547
mod special_targets {
549
548
use std:: { fs, thread, time:: Duration } ;
550
-
549
+ use std :: fs :: remove_dir ;
551
550
use super :: * ;
552
551
use libc:: { kill, SIGINT } ;
553
552
use posixutils_make:: special_target;
@@ -625,15 +624,19 @@ mod special_targets {
625
624
let output = child. wait_with_output ( ) . expect ( "failed to wait for child" ) ;
626
625
627
626
let stdout = String :: from_utf8_lossy ( & output. stdout ) ;
628
- assert_eq ! ( stdout, "echo hello\n hello\n touch some.txt\n sleep 1\n " ) ;
629
- assert ! ( fs:: exists( "./some.txt" ) . unwrap( ) ) ;
627
+ assert_eq ! (
628
+ stdout,
629
+ "echo hello\n hello\n mkdir preciousdir\n touch preciousdir/some.txt\n sleep 1\n "
630
+ ) ;
631
+ assert ! ( fs:: exists( "preciousdir/some.txt" ) . unwrap( ) ) ;
630
632
631
633
let stderr = String :: from_utf8_lossy ( & output. stderr ) ;
632
634
assert_eq ! ( stderr, "make: Interrupt\n " ) ;
633
635
634
636
assert_eq ! ( output. status. code( ) , Some ( 130 ) ) ;
635
637
636
- remove_file ( "some.txt" ) . unwrap ( ) ;
638
+ remove_file ( "preciousdir/some.txt" ) . unwrap ( ) ;
639
+ remove_dir ( "preciousdir" ) . unwrap ( ) ;
637
640
}
638
641
639
642
#[ test]
0 commit comments