File tree Expand file tree Collapse file tree 1 file changed +0
-19
lines changed Expand file tree Collapse file tree 1 file changed +0
-19
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ use std::fs;
17
17
use std:: path:: PathBuf ;
18
18
19
19
/// Return path to database entry for `term`
20
- #[ allow( deprecated) ]
21
20
pub fn get_dbpath_for_term ( term : & str ) -> Option < PathBuf > {
22
21
let mut dirs_to_search = Vec :: new ( ) ;
23
22
let first_char = match term. chars ( ) . next ( ) {
@@ -79,21 +78,3 @@ pub fn get_dbpath_for_term(term: &str) -> Option<PathBuf> {
79
78
}
80
79
None
81
80
}
82
-
83
- #[ test]
84
- #[ ignore( reason = "buildbots don't have ncurses installed and I can't mock everything I need" ) ]
85
- fn test_get_dbpath_for_term ( ) {
86
- // woefully inadequate test coverage
87
- // note: current tests won't work with non-standard terminfo hierarchies (e.g. OS X's)
88
- use std:: env;
89
- // FIXME (#9639): This needs to handle non-utf8 paths
90
- fn x ( t : & str ) -> String {
91
- let p = get_dbpath_for_term ( t) . expect ( "no terminfo entry found" ) ;
92
- p. to_str ( ) . unwrap ( ) . to_string ( )
93
- }
94
- assert ! ( x( "screen" ) == "/usr/share/terminfo/s/screen" ) ;
95
- assert ! ( get_dbpath_for_term( "" ) == None ) ;
96
- env:: set_var ( "TERMINFO_DIRS" , ":" ) ;
97
- assert ! ( x( "screen" ) == "/usr/share/terminfo/s/screen" ) ;
98
- env:: remove_var ( "TERMINFO_DIRS" ) ;
99
- }
You can’t perform that action at this time.
0 commit comments