just/tests/guards.rs
Casey Rodarmor 7e5ad64b52 Add ? sigil
2024-12-22 21:56:43 -08:00

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();
}