pub const GREEN: &str = "\x1b[32m";
pub const RED: &str = "\x1b[31m";
pub const YELLOW: &str = "\x1b[33m";
pub const CYAN: &str = "\x1b[36m";
pub const DIM: &str = "\x1b[90m";
pub const RESET: &str = "\x1b[0m";
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_color_codes_are_valid_ansi() {
assert!(GREEN.starts_with("\x1b["));
assert!(RED.starts_with("\x1b["));
assert!(YELLOW.starts_with("\x1b["));
assert!(CYAN.starts_with("\x1b["));
assert!(DIM.starts_with("\x1b["));
assert!(RESET.starts_with("\x1b["));
}
#[test]
fn test_reset_ends_sequences() {
assert_eq!(RESET, "\x1b[0m");
}
}