xref: /third_party/rust/crates/rustix/tests/process/uname.rs (revision b8a62b91)
  • Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/rust/crates/rustix/tests/process/
1#[test]
2fn test_uname() {
3    let name: rustix::process::Uname = rustix::process::uname();
4
5    assert!(!name.sysname().to_bytes().is_empty());
6    assert!(!name.nodename().to_bytes().is_empty());
7    assert!(!name.release().to_bytes().is_empty());
8    assert!(!name.version().to_bytes().is_empty());
9    assert!(!name.machine().to_bytes().is_empty());
10
11    #[cfg(any(target_os = "android", target_os = "linux"))]
12    assert!(!name.domainname().to_bytes().is_empty());
13}
14

Indexes created Thu Nov 07 10:32:03 CST 2024