summaryrefslogtreecommitdiffstats
path: root/vendor/rustix/tests/process/uname.rs
blob: bc944c49ea85bced455ee750080806c1f63b9757 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#[test]
fn test_uname() {
    let name: rustix::process::Uname = rustix::process::uname();

    assert!(!name.sysname().to_bytes().is_empty());
    assert!(!name.nodename().to_bytes().is_empty());
    assert!(!name.release().to_bytes().is_empty());
    assert!(!name.version().to_bytes().is_empty());
    assert!(!name.machine().to_bytes().is_empty());

    #[cfg(any(target_os = "android", target_os = "linux"))]
    assert!(!name.domainname().to_bytes().is_empty());
}