Skip to content

Commit 7f1b282

Browse files
committed
term: Remove unnecessary #[allow(deprecated)] and broken test
1 parent b54770c commit 7f1b282

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

src/libterm/terminfo/searcher.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ use std::fs;
1717
use std::path::PathBuf;
1818

1919
/// Return path to database entry for `term`
20-
#[allow(deprecated)]
2120
pub fn get_dbpath_for_term(term: &str) -> Option<PathBuf> {
2221
let mut dirs_to_search = Vec::new();
2322
let first_char = match term.chars().next() {
@@ -79,21 +78,3 @@ pub fn get_dbpath_for_term(term: &str) -> Option<PathBuf> {
7978
}
8079
None
8180
}
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-
}

0 commit comments

Comments
 (0)