diff options
Diffstat (limited to 'vendor/os_info/src/windows/mod.rs')
-rw-r--r-- | vendor/os_info/src/windows/mod.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/vendor/os_info/src/windows/mod.rs b/vendor/os_info/src/windows/mod.rs new file mode 100644 index 000000000..4e57d4a62 --- /dev/null +++ b/vendor/os_info/src/windows/mod.rs @@ -0,0 +1,26 @@ +mod winapi; + +use log::trace; + +use crate::Info; + +pub fn current_platform() -> Info { + trace!("windows::current_platform is called"); + let info = winapi::get(); + trace!("Returning {:?}", info); + info +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::Type; + use pretty_assertions::assert_eq; + + #[test] + fn os_type() { + let version = current_platform(); + assert_eq!(Type::Windows, version.os_type()); + assert!(version.edition().is_some()); + } +} |