We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2f9531 commit 8122d04Copy full SHA for 8122d04
src/sys/mod.rs
@@ -39,7 +39,6 @@ pub mod reboot;
39
40
pub mod termios;
41
42
-#[cfg(any(target_os = "linux", target_os = "android"))]
43
pub mod utsname;
44
45
pub mod wait;
src/sys/utsname.rs
@@ -52,8 +52,21 @@ fn to_str<'a>(s: *const *const c_char) -> &'a str {
52
mod test {
53
use super::uname;
54
55
+ #[cfg(target_os = "linux")]
56
#[test]
- pub fn test_uname() {
57
+ pub fn test_uname_linux() {
58
assert_eq!(uname().sysname(), "Linux");
59
}
60
+
61
+ #[cfg(target_os = "darwin")]
62
+ #[test]
63
+ pub fn test_uname_darwin() {
64
+ assert_eq!(uname().sysname(), "Darwin");
65
+ }
66
67
+ #[cfg(target_os = "freebsd")]
68
69
+ pub fn test_uname_freebsd() {
70
+ assert_eq!(uname().sysname(), "FreeBSD");
71
72
0 commit comments