Skip to content

Commit

Permalink
Expand test to cover matching case
Browse files Browse the repository at this point in the history
  • Loading branch information
casey committed Dec 10, 2024
1 parent f0752d6 commit f145c17
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions tests/regexes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,26 @@ fn bad_regex_fails_at_runtime() {
}

#[test]
fn not_matching_regex() {
fn mismatch() {
Test::new()
.justfile(
"
foo := if 'Foo' !~ '^ab+c' {
'no'
'mismatch'
} else {
'yes'
'match'
}
default:
echo {{ foo }}
bar := if 'Foo' !~ 'Foo' {
'mismatch'
} else {
'match'
}
@default:
echo {{ foo }} {{ bar }}
",
)
.stderr("echo no\n")
.stdout("no\n")
.stdout("mismatch match\n")
.run();
}

0 comments on commit f145c17

Please sign in to comment.