Skip to content

Commit 70e8255

Browse files
author
tosite
committed
error message has changed between php7.3 and earlier.
1 parent 44795bc commit 70e8255

File tree

1 file changed

+36
-8
lines changed

1 file changed

+36
-8
lines changed

features/search-replace.feature

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -405,34 +405,62 @@ Feature: Do global search/replace
405405
And the return code should be 1
406406

407407
When I try `wp search-replace 'regex error)' '' --regex`
408-
Then STDERR should be:
408+
Then STDERR should contain:
409409
"""
410410
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
412419
"""
413420
And the return code should be 1
414421

415422
When I try `wp search-replace 'regex error)' '' --regex --regex-flags=u`
416-
Then STDERR should be:
423+
Then STDERR should contain:
417424
"""
418425
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
420434
"""
421435
And the return code should be 1
422436

423437
When I try `wp search-replace 'regex error)' '' --regex --regex-delimiter=/`
424-
Then STDERR should be:
438+
Then STDERR should contain:
425439
"""
426440
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
428449
"""
429450
And the return code should be 1
430451

431452
When I try `wp search-replace 'regex error)' '' --regex --regex-delimiter=/ --regex-flags=u`
432-
Then STDERR should be:
453+
Then STDERR should contain:
433454
"""
434455
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
436464
"""
437465
And the return code should be 1
438466

0 commit comments

Comments
 (0)