mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
tests/expr: add tests for ""
This commit is contained in:
parent
7421c81a22
commit
04ab5b0108
1 changed files with 10 additions and 0 deletions
|
@ -143,6 +143,14 @@ fn test_or() {
|
||||||
.args(&["12", "|", "9a", "+", "1"])
|
.args(&["12", "|", "9a", "+", "1"])
|
||||||
.succeeds()
|
.succeeds()
|
||||||
.stdout_only("12\n");
|
.stdout_only("12\n");
|
||||||
|
|
||||||
|
new_ucmd!().args(&["", "|", ""]).run().stdout_only("0\n");
|
||||||
|
|
||||||
|
new_ucmd!().args(&["", "|", "0"]).run().stdout_only("0\n");
|
||||||
|
|
||||||
|
new_ucmd!().args(&["", "|", "00"]).run().stdout_only("0\n");
|
||||||
|
|
||||||
|
new_ucmd!().args(&["", "|", "-0"]).run().stdout_only("0\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
@ -178,6 +186,8 @@ fn test_and() {
|
||||||
.stdout_only("0\n");
|
.stdout_only("0\n");
|
||||||
|
|
||||||
new_ucmd!().args(&["", "&", "1"]).run().stdout_only("0\n");
|
new_ucmd!().args(&["", "&", "1"]).run().stdout_only("0\n");
|
||||||
|
|
||||||
|
new_ucmd!().args(&["", "&", ""]).run().stdout_only("0\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue