Skip to content

Commit

Permalink
tests/expr: add tests for test_and
Browse files Browse the repository at this point in the history
  • Loading branch information
Luv-Ray committed Oct 13, 2023
1 parent ae1c4cc commit 40f05a3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/by-util/test_expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,21 @@ fn test_and() {
.args(&["-14", "&", "1"])
.run()
.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]
Expand Down

0 comments on commit 40f05a3

Please sign in to comment.