mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
test: -o arg should trigger an error (#6642)
* test: -o arg should trigger an error Should fix tests/test/test-diag.pl * test: use var directly in string --------- Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
This commit is contained in:
parent
fa03b85a47
commit
6b70dc232e
3 changed files with 19 additions and 1 deletions
|
@ -67,7 +67,7 @@ fn test_double_not_is_false() {
|
|||
|
||||
#[test]
|
||||
fn test_and_not_is_false() {
|
||||
new_ucmd!().args(&["-a", "!"]).run().code_is(1);
|
||||
new_ucmd!().args(&["-a", "!"]).run().code_is(2);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -86,6 +86,18 @@ fn test_simple_or() {
|
|||
new_ucmd!().args(&["foo", "-o", ""]).succeeds();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_errors_miss_and_or() {
|
||||
new_ucmd!()
|
||||
.args(&["-o", "arg"])
|
||||
.fails()
|
||||
.stderr_contains("'-o': unary operator expected");
|
||||
new_ucmd!()
|
||||
.args(&["-a", "arg"])
|
||||
.fails()
|
||||
.stderr_contains("'-a': unary operator expected");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_negated_or() {
|
||||
new_ucmd!()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue