use std::env;
pub fn get_operating_system_name() -> &'static str {
env::consts::OS
}
pub fn is_linux() -> bool {
get_operating_system_name() == "linux"
}
pub fn is_windows() -> bool {
get_operating_system_name() == "windows"
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn get_operating_system_name_test() {
assert!(get_operating_system_name().len() > 0);
}
#[test]
fn is_linux_test() {
assert!(is_linux() != is_windows());
}
#[test]
fn is_windows_test() {
assert!(is_windows() != is_linux());
}
}