Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions features/search-replace.feature
Original file line number Diff line number Diff line change
Expand Up @@ -396,11 +396,16 @@ Feature: Do global search/replace
https://example.com
"""

# NOTE: The preg_match() error message is a substring of the actual message that matches across supported PHP versions.
# In PHP 8.2, the error message changed from
# "preg_match(): Delimiter must not be alphanumeric or backslash."
# to
# "preg_match(): Delimiter must not be alphanumeric, backslash, or NUL"
When I try `wp search-replace 'HTTPS://EXAMPLE.COM' 'https://example.jp/' wp_options --regex --regex-flags=i --regex-delimiter='1'`
Then STDERR should be:
Then STDERR should contain:
"""
Error: The regex '1HTTPS://EXAMPLE.COM1i' fails.
preg_match(): Delimiter must not be alphanumeric or backslash.
preg_match(): Delimiter must not be alphanumeric
"""
And the return code should be 1

Expand Down