From 021efb082371ee60dbed54140491341af936127a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 20 Jun 2026 11:48:07 +0000 Subject: [PATCH 1/3] Initial plan From 29ffc5f2d83da66050932de41ecb961ed7520e34 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 20 Jun 2026 11:50:25 +0000 Subject: [PATCH 2/3] test: relax regex offset expectation Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com> --- features/search-replace.feature | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/features/search-replace.feature b/features/search-replace.feature index 3ce1a2d5..31d496da 100644 --- a/features/search-replace.feature +++ b/features/search-replace.feature @@ -509,7 +509,7 @@ Feature: Do global search/replace """ And STDERR should contain: """ - at offset 11 + unmatched closing parenthesis at offset 1 """ And the return code should be 1 @@ -524,7 +524,7 @@ Feature: Do global search/replace """ And STDERR should contain: """ - at offset 11 + unmatched closing parenthesis at offset 1 """ And the return code should be 1 @@ -539,7 +539,7 @@ Feature: Do global search/replace """ And STDERR should contain: """ - at offset 11 + unmatched closing parenthesis at offset 1 """ And the return code should be 1 @@ -554,7 +554,7 @@ Feature: Do global search/replace """ And STDERR should contain: """ - at offset 11 + unmatched closing parenthesis at offset 1 """ And the return code should be 1 From ad8e0e051b14ae7d42789fab5624c989a426e61a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 20 Jun 2026 12:00:01 +0000 Subject: [PATCH 3/3] test: use regex matcher for PCRE error variants Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com> --- features/search-replace.feature | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/features/search-replace.feature b/features/search-replace.feature index 31d496da..1f6b1a22 100644 --- a/features/search-replace.feature +++ b/features/search-replace.feature @@ -507,10 +507,7 @@ Feature: Do global search/replace """ preg_match(): Compilation failed: """ - And STDERR should contain: - """ - unmatched closing parenthesis at offset 1 - """ + And STDERR should match /preg_match\(\): Compilation failed: unmatched (closing parenthesis|parentheses) at offset [0-9]+\.?/ And the return code should be 1 When I try `wp search-replace 'regex error)' '' --regex --regex-flags=u` @@ -522,10 +519,7 @@ Feature: Do global search/replace """ preg_match(): Compilation failed: """ - And STDERR should contain: - """ - unmatched closing parenthesis at offset 1 - """ + And STDERR should match /preg_match\(\): Compilation failed: unmatched (closing parenthesis|parentheses) at offset [0-9]+\.?/ And the return code should be 1 When I try `wp search-replace 'regex error)' '' --regex --regex-delimiter=/` @@ -537,10 +531,7 @@ Feature: Do global search/replace """ preg_match(): Compilation failed: """ - And STDERR should contain: - """ - unmatched closing parenthesis at offset 1 - """ + And STDERR should match /preg_match\(\): Compilation failed: unmatched (closing parenthesis|parentheses) at offset [0-9]+\.?/ And the return code should be 1 When I try `wp search-replace 'regex error)' '' --regex --regex-delimiter=/ --regex-flags=u` @@ -552,10 +543,7 @@ Feature: Do global search/replace """ preg_match(): Compilation failed: """ - And STDERR should contain: - """ - unmatched closing parenthesis at offset 1 - """ + And STDERR should match /preg_match\(\): Compilation failed: unmatched (closing parenthesis|parentheses) at offset [0-9]+\.?/ And the return code should be 1 @require-mysql