1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

chgrp: don't output an empty error

This commit is contained in:
Michael Debertol 2021-08-09 01:33:02 +02:00
parent d967a7a553
commit 312e1ce9e0
2 changed files with 19 additions and 1 deletions

View file

@ -228,3 +228,19 @@ fn test_big_h() {
);
}
}
#[test]
#[cfg(target_os = "linux")]
fn basic_succeeds() {
let (at, mut ucmd) = at_and_ucmd!();
let one_group = nix::unistd::getgroups().unwrap();
// if there are no groups we can't run this test.
if let Some(group) = one_group.first() {
at.touch("f1");
ucmd.arg(group.as_raw().to_string())
.arg("f1")
.succeeds()
.no_stdout()
.no_stderr();
}
}