1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-11-05 04:47:58 +00:00
starship/tests/character.rs
2019-05-01 16:34:24 -04:00

21 lines
552 B
Rust

use ansi_term::Color;
use std::path::Path;
mod common;
#[test]
fn char_module_success_status() {
let dir = Path::new("~");
let expected = format!("{} ", Color::Green.bold().paint(""));
let actual = common::render_module_with_status("char", &dir, "0");
assert_eq!(expected, actual);
}
#[test]
fn char_module_failure_status() {
let dir = Path::new("~");
let expected = format!("{} ", Color::Red.bold().paint(""));
let actual = common::render_module_with_status("char", &dir, "1");
assert_eq!(expected, actual);
}