File tree 1 file changed +4
-6
lines changed
library/test/src/term/terminfo/searcher
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -6,14 +6,12 @@ fn test_get_dbpath_for_term() {
6
6
// woefully inadequate test coverage
7
7
// note: current tests won't work with non-standard terminfo hierarchies (e.g., macOS's)
8
8
use std:: env;
9
- // FIXME (#9639): This needs to handle non-utf8 paths
10
- fn x ( t : & str ) -> String {
11
- let p = get_dbpath_for_term ( t) . expect ( "no terminfo entry found" ) ;
12
- p. to_str ( ) . unwrap ( ) . to_string ( )
9
+ fn x ( t : & str ) -> PathBuf {
10
+ get_dbpath_for_term ( t) . expect ( & format ! ( "no terminfo entry found for {t:?}" ) )
13
11
}
14
- assert_eq ! ( x( "screen" ) , "/usr/share/terminfo/s/screen" ) ;
12
+ assert_eq ! ( x( "screen" ) , PathBuf :: from ( "/usr/share/terminfo/s/screen" ) ) ;
15
13
assert_eq ! ( get_dbpath_for_term( "" ) , None ) ;
16
14
env:: set_var ( "TERMINFO_DIRS" , ":" ) ;
17
- assert_eq ! ( x( "screen" ) , "/usr/share/terminfo/s/screen" ) ;
15
+ assert_eq ! ( x( "screen" ) , PathBuf :: from ( "/usr/share/terminfo/s/screen" ) ) ;
18
16
env:: remove_var ( "TERMINFO_DIRS" ) ;
19
17
}
You can’t perform that action at this time.
0 commit comments