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

chmod: fail if the operand list is empty

This commit is contained in:
Michael Debertol 2021-08-17 15:27:34 +02:00
parent 945e57ea22
commit b841a11421
2 changed files with 13 additions and 0 deletions

View file

@ -523,3 +523,12 @@ fn test_chmod_keep_setgid() {
assert_eq!(at.metadata("dir").permissions().mode(), to);
}
}
#[test]
fn test_no_operands() {
new_ucmd!()
.arg("777")
.fails()
.code_is(1)
.stderr_is("chmod: missing operand");
}