1
Fork 0
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:
Sylvestre Ledru 2021-07-07 15:43:38 +02:00 committed by GitHub
commit df683f8c84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 109 additions and 4 deletions

View file

@ -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());
}