mirror of
https://github.com/casey/just.git
synced 2025-07-07 17:45:00 +00:00
27 lines
387 B
Rust
27 lines
387 B
Rust
use super::*;
|
|
|
|
#[test]
|
|
fn assert_pass() {
|
|
Test::new()
|
|
.justfile(
|
|
"
|
|
foo:
|
|
{{ assert('a' == 'a', 'error message') }}
|
|
",
|
|
)
|
|
.run();
|
|
}
|
|
|
|
#[test]
|
|
fn assert_fail() {
|
|
Test::new()
|
|
.justfile(
|
|
"
|
|
foo:
|
|
{{ assert('a' != 'a', 'error message') }}
|
|
",
|
|
)
|
|
.stderr("error: Assert failed: error message\n")
|
|
.status(EXIT_FAILURE)
|
|
.run();
|
|
}
|