1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

tests/expr: add tests for test_and

This commit is contained in:
Zhuoxun Yang 2023-10-14 01:58:53 +08:00
parent ae1c4ccfd2
commit 40f05a331e

View file

@ -155,6 +155,21 @@ fn test_and() {
.args(&["-14", "&", "1"]) .args(&["-14", "&", "1"])
.run() .run()
.stdout_is("-14\n"); .stdout_is("-14\n");
new_ucmd!()
.args(&["0", "&", "a", "/", "5"])
.run()
.stdout_only("0\n");
new_ucmd!()
.args(&["", "&", "a", "/", "5"])
.run()
.stdout_only("0\n");
new_ucmd!()
.args(&["-1", "&", "10", "/", "5"])
.succeeds()
.stdout_only("-1\n");
} }
#[test] #[test]