mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-01 21:47:46 +00:00
Merge pull request #2465 from miDeb/install-test
[: install test as [ as well
This commit is contained in:
commit
df683f8c84
3 changed files with 109 additions and 4 deletions
|
@ -718,3 +718,21 @@ fn test_bracket_syntax_missing_right_bracket() {
|
|||
.status_code(2)
|
||||
.stderr_is("[: missing ']'");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_bracket_syntax_help() {
|
||||
let scenario = TestScenario::new("[");
|
||||
let mut ucmd = scenario.ucmd();
|
||||
|
||||
ucmd.arg("--help").succeeds().stdout_contains("USAGE:");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_bracket_syntax_version() {
|
||||
let scenario = TestScenario::new("[");
|
||||
let mut ucmd = scenario.ucmd();
|
||||
|
||||
ucmd.arg("--version")
|
||||
.succeeds()
|
||||
.stdout_matches(&r"\[ \d+\.\d+\.\d+".parse().unwrap());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue