mirror of
https://github.com/casey/just.git
synced 2025-12-23 11:37:29 +00:00
32 lines
439 B
Rust
32 lines
439 B
Rust
use super::*;
|
|
|
|
#[test]
|
|
fn guard_lines_halt_executation() {
|
|
Test::new()
|
|
.justfile(
|
|
"
|
|
set guards
|
|
|
|
@foo:
|
|
?[[ 'foo' == 'bar' ]]
|
|
echo baz
|
|
",
|
|
)
|
|
.run();
|
|
}
|
|
|
|
#[test]
|
|
fn guard_lines_have_no_effect_if_successful() {
|
|
Test::new()
|
|
.justfile(
|
|
"
|
|
set guards
|
|
|
|
@foo:
|
|
?[[ 'foo' == 'foo' ]]
|
|
echo baz
|
|
",
|
|
)
|
|
.stdout("baz\n")
|
|
.run();
|
|
}
|