2019-04-16 02:54:52 +02:00
|
|
|
use ansi_term::Color;
|
|
|
|
use std::path::Path;
|
|
|
|
|
|
|
|
mod common;
|
|
|
|
|
|
|
|
#[test]
|
2019-05-01 22:34:24 +02:00
|
|
|
fn char_module_success_status() {
|
2019-04-16 02:54:52 +02:00
|
|
|
let dir = Path::new("~");
|
2019-05-01 22:34:24 +02:00
|
|
|
let expected = format!("{} ", Color::Green.bold().paint("➜"));
|
|
|
|
let actual = common::render_module_with_status("char", &dir, "0");
|
2019-04-16 02:54:52 +02:00
|
|
|
assert_eq!(expected, actual);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
2019-05-01 22:34:24 +02:00
|
|
|
fn char_module_failure_status() {
|
2019-04-16 02:54:52 +02:00
|
|
|
let dir = Path::new("~");
|
2019-05-01 22:34:24 +02:00
|
|
|
let expected = format!("{} ", Color::Red.bold().paint("➜"));
|
|
|
|
let actual = common::render_module_with_status("char", &dir, "1");
|
2019-04-16 02:54:52 +02:00
|
|
|
assert_eq!(expected, actual);
|
|
|
|
}
|