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
456
456
"""
457
457
And the return code should be 1
458
458
459
- @less-than-php-8.2
460
459
Scenario : Search replace with an invalid regex delimiter
461
460
Given a WP install
462
461
462
+ # Exact preg_match() error changed with PHP 8.2+ (added NUL).
463
463
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:
477
465
"""
478
466
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
480
468
"""
481
469
And the return code should be 1
482
-
483
470
Scenario : Formatting as count-only
484
471
Given a WP install
485
472
And I run `wp option set foo 'ALPHA.example.com' `
You can’t perform that action at this time.
0 commit comments