File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
library/test/src/term/terminfo/searcher Expand file tree Collapse file tree 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() {
66 // woefully inadequate test coverage
77 // note: current tests won't work with non-standard terminfo hierarchies (e.g., macOS's)
88 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:?}" ) )
1311 }
14- assert_eq ! ( x( "screen" ) , "/usr/share/terminfo/s/screen" ) ;
12+ assert_eq ! ( x( "screen" ) , PathBuf :: from ( "/usr/share/terminfo/s/screen" ) ) ;
1513 assert_eq ! ( get_dbpath_for_term( "" ) , None ) ;
1614 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" ) ) ;
1816 env:: remove_var ( "TERMINFO_DIRS" ) ;
1917}
You can’t perform that action at this time.
0 commit comments