mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
ls: tests for invalid patterns for hide and ignore
This commit is contained in:
parent
fa4272a19b
commit
76308dbec9
2 changed files with 27 additions and 2 deletions
|
@ -1288,4 +1288,29 @@ fn test_ls_ignore_hide() {
|
|||
.arg("*.md")
|
||||
.succeeds()
|
||||
.stdout_is("CONTRIBUTING.md\nREADME.md\nREADMECAREFULLY.md\nsome_other_file\n");
|
||||
|
||||
// Stacking multiple patterns
|
||||
scene
|
||||
.ucmd()
|
||||
.arg("--ignore")
|
||||
.arg("README*")
|
||||
.arg("--ignore")
|
||||
.arg("CONTRIBUTING*")
|
||||
.succeeds()
|
||||
.stdout_is("some_other_file\n");
|
||||
|
||||
// Invalid patterns
|
||||
scene
|
||||
.ucmd()
|
||||
.arg("--ignore")
|
||||
.arg("READ[ME")
|
||||
.succeeds()
|
||||
.stderr_contains(&"Invalid pattern");
|
||||
|
||||
scene
|
||||
.ucmd()
|
||||
.arg("--ignore")
|
||||
.arg("READ[ME")
|
||||
.succeeds()
|
||||
.stderr_contains(&"Invalid pattern");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue