File tree Expand file tree Collapse file tree 1 file changed +3
-16
lines changed
Expand file tree Collapse file tree 1 file changed +3
-16
lines changed Original file line number Diff line number Diff line change @@ -456,30 +456,17 @@ Feature: Do global search/replace
456456 """
457457 And the return code should be 1
458458
459- @less-than-php-8.2
460459 Scenario : Search replace with an invalid regex delimiter
461460 Given a WP install
462461
462+ # Exact preg_match() error changed with PHP 8.2+ (added NUL).
463463 When I try `wp search-replace 'HTTPS://EXAMPLE.COM' 'https://example.jp/' wp_options --regex --regex-flags=i --regex-delimiter='1' `
464- Then STDERR should be:
465- """
466- Error: The regex '1HTTPS://EXAMPLE.COM1i' fails.
467- preg_match(): Delimiter must not be alphanumeric or backslash.
468- """
469- And the return code should be 1
470-
471- @require-php-8.2
472- Scenario : Search replace with an invalid regex delimiter
473- Given a WP install
474-
475- When I try `wp search-replace 'HTTPS://EXAMPLE.COM' 'https://example.jp/' wp_options --regex --regex-flags=i --regex-delimiter='1' `
476- Then STDERR should be:
464+ Then STDERR should contain:
477465 """
478466 Error: The regex '1HTTPS://EXAMPLE.COM1i' fails.
479- preg_match(): Delimiter must not be alphanumeric, backslash, or NUL.
467+ preg_match(): Delimiter must not be alphanumeric
480468 """
481469 And the return code should be 1
482-
483470 Scenario : Formatting as count-only
484471 Given a WP install
485472 And I run `wp option set foo 'ALPHA.example.com' `
You can’t perform that action at this time.
0 commit comments