Skip to content

Commit 297e749

Browse files
committed
fix: snapshot::match_with_placeholder fallback if no perl found
1 parent 5f1a20b commit 297e749

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/assert_snapshot.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function snapshot::match_with_placeholder() {
2626
fallback_pattern=$(printf '%s' "$fallback_pattern" | sed -e 's/[][\.^$*+?{}|()]/\\&/g')
2727
fallback_pattern="^${fallback_pattern}$"
2828

29-
if printf '%s\n' "$actual" | grep -Eq "$fallback_pattern"; then
29+
if printf '%s' "$actual" | grep -zEq "$fallback_pattern"; then
3030
return 0
3131
else
3232
return 1

0 commit comments

Comments
 (0)