Skip to content
This repository has been archived by the owner on Aug 12, 2021. It is now read-only.

Commit

Permalink
remove some compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
tshepang committed Mar 1, 2015
1 parent 13e1e44 commit f86103d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions terminfo/searcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,17 @@ pub fn open(term: &str) -> Result<File, String> {
fn test_get_dbpath_for_term() {
// woefully inadequate test coverage
// note: current tests won't work with non-standard terminfo hierarchies (e.g. OS X's)
use std::os::{setenv, unsetenv};
use std::env;
// FIXME (#9639): This needs to handle non-utf8 paths
fn x(t: &str) -> String {
let p = get_dbpath_for_term(t).expect("no terminfo entry found");
p.as_str().unwrap().to_string()
};
assert!(x("screen") == "/usr/share/terminfo/s/screen");
assert!(get_dbpath_for_term("") == None);
setenv("TERMINFO_DIRS", ":");
env::set_var("TERMINFO_DIRS", ":");
assert!(x("screen") == "/usr/share/terminfo/s/screen");
unsetenv("TERMINFO_DIRS");
env::remove_var("TERMINFO_DIRS");
}

#[test]
Expand Down

0 comments on commit f86103d

Please sign in to comment.