diff --git a/tests/by-util/test_dircolors.rs b/tests/by-util/test_dircolors.rs index 8ddbac9f4..f34f5573b 100644 --- a/tests/by-util/test_dircolors.rs +++ b/tests/by-util/test_dircolors.rs @@ -141,6 +141,15 @@ fn test_stdin() { .no_stderr(); } +#[test] +fn test_extra_operand() { + new_ucmd!() + .args(&["-c", "file1", "file2"]) + .fails() + .stderr_contains("dircolors: extra operand 'file2'\n") + .no_stdout(); +} + fn test_helper(file_name: &str, term: &str) { new_ucmd!() .env("TERM", term)