1pub mod unicoqude {
12 pub fn check() -> bool {
13 #[cfg(target_os = "windows")]
14 return true;
15
16 #[cfg(target_family = "unix")]
17 match std::env::var("TERM").unwrap().as_str() {
18 "xterm-256color" | "alacritty" => return true,
19 _ => {}
20 }
21
22 false
23 }
24}
25
26#[cfg(test)]
27mod tests {
28 #[test]
29 fn ok() {
30 print!("{} ", "Your terminal emulator has");
31
32 match crate::unicoqude::check() {
33 true => {
34 print!("{} ", "support");
35 },
36 false => {
37 print!("{} ", "not support");
38 }
39 }
40
41 println!("{}", "unicode");
42 }
43}