File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -1552,7 +1552,6 @@ fn test_files0_from_zero_length() {
15521552fn test_files0_from_non_utf8_filename ( ) {
15531553 use std:: ffi:: OsStr ;
15541554 use std:: os:: unix:: ffi:: OsStrExt ;
1555- use std:: path:: Path ;
15561555 let ( at, mut ucmd) = at_and_ucmd ! ( ) ;
15571556
15581557 at. touch ( "file1.txt" ) ;
@@ -1561,15 +1560,15 @@ fn test_files0_from_non_utf8_filename() {
15611560 at. append ( "file2.txt" , "apple\n " ) ;
15621561
15631562 // Create a file with non-UTF-8 bytes in filename
1564- let non_utf8_name = OsStr :: from_bytes ( b" \xff \xfe file3.txt" ) ;
1565- let non_utf8_path = at . plus_as_string ( "" ) . to_owned ( ) + "/" ;
1566- let full_path = Path :: new ( & non_utf8_path ) . join ( non_utf8_name) ;
1563+ // spell-checker:ignore fffile
1564+ let non_utf8_name = OsStr :: from_bytes ( b" \xff \xff _file3.txt" ) ;
1565+ let full_path = at . plus ( non_utf8_name) ;
15671566 std:: fs:: write ( & full_path, "banana\n " ) . unwrap ( ) ;
15681567
15691568 // Create files0-from input containing the non-UTF-8 filename bytes
15701569 let mut files0_input = Vec :: new ( ) ;
15711570 files0_input. extend_from_slice ( b"file1.txt\0 " ) ;
1572- files0_input. extend_from_slice ( b"\xff \xfe file3 .txt\0 " ) ;
1571+ files0_input. extend_from_slice ( b"\xff \xff _file3 .txt\0 " ) ;
15731572 files0_input. extend_from_slice ( b"file2.txt\0 " ) ;
15741573
15751574 ucmd. args ( & [ "--files0-from" , "-" ] )
You can’t perform that action at this time.
0 commit comments