mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
tests/expr: add tests for ""
This commit is contained in:
@@ -143,6 +143,14 @@ fn test_or() {
|
||||
.args(&["12", "|", "9a", "+", "1"])
|
||||
.succeeds()
|
||||
.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]
|
||||
@@ -178,6 +186,8 @@ fn test_and() {
|
||||
.stdout_only("0\n");
|
||||
|
||||
new_ucmd!().args(&["", "&", "1"]).run().stdout_only("0\n");
|
||||
|
||||
new_ucmd!().args(&["", "&", ""]).run().stdout_only("0\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user