File: test_utsname.rs

package info (click to toggle)
rust-nix 0.30.1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 3,248 kB
  • sloc: ansic: 18; makefile: 7
file content (18 lines) | stat: -rw-r--r-- 447 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![cfg(feature = "feature")]
#[cfg(target_os = "linux")]
#[test]
pub fn test_uname_linux() {
    assert_eq!(nix::sys::utsname::uname().unwrap().sysname(), "Linux");
}

#[cfg(apple_targets)]
#[test]
pub fn test_uname_darwin() {
    assert_eq!(nix::sys::utsname::uname().unwrap().sysname(), "Darwin");
}

#[cfg(target_os = "freebsd")]
#[test]
pub fn test_uname_freebsd() {
    assert_eq!(nix::sys::utsname::uname().unwrap().sysname(), "FreeBSD");
}