1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-15 19:36:16 +00:00

Merge pull request #4271 from eds-collabora/eds/nice

Support legacy argument syntax for nice
This commit is contained in:
Sylvestre Ledru 2023-01-22 20:57:08 +01:00 committed by GitHub
commit 6f95f0953b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 120 additions and 5 deletions

View file

@ -63,3 +63,22 @@ fn test_command_where_command_takes_n_flag() {
fn test_invalid_argument() {
new_ucmd!().arg("--invalid").fails().code_is(125);
}
#[test]
fn test_bare_adjustment() {
new_ucmd!()
.args(&["-1", "echo", "-n", "a"])
.run()
.stdout_is("a");
}
#[test]
fn test_trailing_empty_adjustment() {
new_ucmd!()
.args(&["-n", "1", "-n"])
.fails()
.stderr_str()
.starts_with(
"error: The argument '--adjustment <adjustment>' requires a value but none was supplied",
);
}