File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1123,12 +1123,12 @@ mod test {
11231123 try!( :: std:: str:: from_utf8 ( s) . context ( p) ) ;
11241124 Ok ( ( ) )
11251125 }
1126- assert_eq ! ( format! ( "{}" , parse_utf( b"a\x80 \x80 " , "/etc" ) . unwrap_err( ) ) ,
1127- "Path error at \" /etc \" : invalid utf-8: \
1128- invalid byte near index 1" ) ;
1129- assert_eq ! ( format! ( "{}" , parse_utf( b"\x80 \x80 " ,
1130- PathBuf :: from ( "/tmp" ) ) . unwrap_err ( ) ) ,
1131- "Path error at \" /tmp \" : invalid utf-8: \
1132- invalid byte near index 0" ) ;
1126+ let etext = parse_utf ( b"a\x80 \x80 " , "/etc" ) . unwrap_err ( ) . to_string ( ) ;
1127+ assert ! ( etext . starts_with (
1128+ "Path error at \" /etc \" : invalid utf-8: invalid " ) ) ;
1129+ let etext = parse_utf ( b"\x80 \x80 " , PathBuf :: from ( "/tmp" ) ) . unwrap_err ( )
1130+ . to_string ( ) ;
1131+ assert ! ( etext . starts_with (
1132+ "Path error at \" /tmp \" : invalid utf-8: invalid " ) ) ;
11331133 }
11341134}
You can’t perform that action at this time.
0 commit comments