just/tests/assertions.rs

23 lines
347 B
Rust
Raw Normal View History

2024-05-14 18:55:32 -07:00
use super::*;
test! {
name: assert_pass,
justfile: "
foo:
{{ assert('a' == 'a', 'error message') }}
",
stdout: "",
stderr: "",
}
test! {
name: assert_fail,
justfile: "
foo:
{{ assert('a' != 'a', 'error message') }}
",
stdout: "",
stderr: "error: Assert failed: error message\n",
status: EXIT_FAILURE,
}