urs 0.5.1

Rust utility library
Documentation
use misc::{is_executable, search_in_path};

use super::*;

// will succeed on POSIX systems
#[test]
pub fn search_path() {
    let r = misc::search_for_path(&["/usr", "/bin"], "sh");
    let r2 = misc::search_for_path(&["/etc", "/root"], "passwd");

    r.unwrap();
    r2.unwrap();
}

#[test]
pub fn color_equal() {
    use console::Color;
    assert_eq!(Color::Black, Color::Black);
    assert_eq!(Color::Cyan, Color::Cyan);
    assert_ne!(Color::Yellow, Color::BrightRed);
}

#[test]
pub fn search_path2() {
    search_in_path("pwd").unwrap();
    assert!(is_executable("gcc"));
}