1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 19:47:45 +00:00

uname(test): fix 'unused variable: result'

This commit is contained in:
Sylvestre Ledru 2021-05-02 09:41:04 +02:00
parent 108f9928ef
commit c03a7d8856

View file

@ -36,7 +36,12 @@ fn test_uname_kernel_version() {
fn test_uname_kernel() { fn test_uname_kernel() {
let (_, mut ucmd) = at_and_ucmd!(); let (_, mut ucmd) = at_and_ucmd!();
let result = ucmd.arg("-o").succeeds();
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
assert!(result.stdout_str().to_lowercase().contains("linux")); {
let result = ucmd.arg("-o").succeeds();
assert!(result.stdout_str().to_lowercase().contains("linux"));
}
#[cfg(not(target_os = "linux"))]
let result = ucmd.arg("-o").succeeds();
} }