File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 8
8
// option. This file may not be copied, modified, or distributed
9
9
// except according to those terms.
10
10
11
+ use std:: slice:: SliceExt ;
11
12
use std:: io:: { Command , fs, USER_RWX } ;
12
13
use std:: os;
13
14
use std:: path:: BytesContainer ;
@@ -17,8 +18,11 @@ fn main() {
17
18
// If we're the child, make sure we were invoked correctly
18
19
let args = os:: args ( ) ;
19
20
if args. len ( ) > 1 && args[ 1 ] . as_slice ( ) == "child" {
20
- return assert_eq ! ( args[ 0 ] ,
21
- format!( "mytest{}" , os:: consts:: EXE_SUFFIX ) ) ;
21
+ // FIXME: This should check the whole `args[0]` instead of just
22
+ // checking that it ends_with the executable name. This
23
+ // is needed because of Windows, which has a different behavior.
24
+ // See #15149 for more info.
25
+ return assert ! ( args[ 0 ] . ends_with( & format!( "mytest{}" , os:: consts:: EXE_SUFFIX ) [ ] ) ) ;
22
26
}
23
27
24
28
test ( ) ;
You can’t perform that action at this time.
0 commit comments