@@ -405,34 +405,62 @@ Feature: Do global search/replace
405
405
And the return code should be 1
406
406
407
407
When I try `wp search-replace 'regex error)' '' --regex`
408
- Then STDERR should be :
408
+ Then STDERR should contain :
409
409
"""
410
410
Error: The regex pattern 'regex error)' with default delimiter 'chr(1)' and no flags fails.
411
- preg_match(): Compilation failed: unmatched parentheses at offset 11.
411
+ """
412
+ And STDERR should contain:
413
+ """
414
+ preg_match(): Compilation failed:
415
+ """
416
+ And STDERR should contain:
417
+ """
418
+ at offset 11
412
419
"""
413
420
And the return code should be 1
414
421
415
422
When I try `wp search-replace 'regex error)' '' --regex --regex-flags=u`
416
- Then STDERR should be :
423
+ Then STDERR should contain :
417
424
"""
418
425
Error: The regex pattern 'regex error)' with default delimiter 'chr(1)' and flags 'u' fails.
419
- preg_match(): Compilation failed: unmatched parentheses at offset 11.
426
+ """
427
+ And STDERR should contain:
428
+ """
429
+ preg_match(): Compilation failed:
430
+ """
431
+ And STDERR should contain:
432
+ """
433
+ at offset 11
420
434
"""
421
435
And the return code should be 1
422
436
423
437
When I try `wp search-replace 'regex error)' '' --regex --regex-delimiter=/`
424
- Then STDERR should be :
438
+ Then STDERR should contain :
425
439
"""
426
440
Error: The regex '/regex error)/' fails.
427
- preg_match(): Compilation failed: unmatched parentheses at offset 11.
441
+ """
442
+ And STDERR should contain:
443
+ """
444
+ preg_match(): Compilation failed:
445
+ """
446
+ And STDERR should contain:
447
+ """
448
+ at offset 11
428
449
"""
429
450
And the return code should be 1
430
451
431
452
When I try `wp search-replace 'regex error)' '' --regex --regex-delimiter=/ --regex-flags=u`
432
- Then STDERR should be :
453
+ Then STDERR should contain :
433
454
"""
434
455
Error: The regex '/regex error)/u' fails.
435
- preg_match(): Compilation failed: unmatched parentheses at offset 11.
456
+ """
457
+ And STDERR should contain:
458
+ """
459
+ preg_match(): Compilation failed:
460
+ """
461
+ And STDERR should contain:
462
+ """
463
+ at offset 11
436
464
"""
437
465
And the return code should be 1
438
466
0 commit comments