Skip to content
This repository was archived by the owner on Mar 20, 2024. It is now read-only.

Commit 0642b68

Browse files
committed
Fixed the regex of the step matching url to avoid breaking formatters
The inner group needs to be non-capturing. Fixes #99
1 parent 5fd83a8 commit 0642b68

17 files changed

+34
-34
lines changed

i18n/cs.xliff

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@
9999
<target><![CDATA[/^musím být na stránce "(?P<page>[^"]+)"$/]]></target>
100100
</trans-unit>
101101
<trans-unit id="the-url-should-match">
102-
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
103-
<target><![CDATA[/^(?:url|adresa|url adresa) musí mít tvar (?P<pattern>"([^"]|\\")*")$/]]></target>
102+
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/]]></source>
103+
<target><![CDATA[/^(?:url|adresa|url adresa) musí mít tvar (?P<pattern>"(?:[^"]|\\")*")$/]]></target>
104104
</trans-unit>
105105
<trans-unit id="the-element-should-contain">
106106
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>

i18n/da.xliff

+2-2
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@
136136
<target><![CDATA[/^(?:|skulle jeg )være på hjemmesiden$/]]></target>
137137
</trans-unit>
138138
<trans-unit id="the-url-should-match">
139-
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
140-
<target><![CDATA[/^skulle webadressen matche (?P<pattern>"([^"]|\\")*")$/]]></target>
139+
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/]]></source>
140+
<target><![CDATA[/^skulle webadressen matche (?P<pattern>"(?:[^"]|\\")*")$/]]></target>
141141
</trans-unit>
142142
<trans-unit id="the-element-should-contain">
143143
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>

i18n/de.xliff

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@
7575
<target><![CDATA[/^(?:|ich )sollte (?:|ich )auf "(?P<page>[^"]+)" sein$/]]></target>
7676
</trans-unit>
7777
<trans-unit id="the-url-should-match">
78-
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
79-
<target><![CDATA[/^(?:|sollte )die Webadresse (?:|sollte )mit (?P<pattern>"([^"]|\\")*") übereinstimmen$/]]></target>
78+
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/]]></source>
79+
<target><![CDATA[/^(?:|sollte )die Webadresse (?:|sollte )mit (?P<pattern>"(?:[^"]|\\")*") übereinstimmen$/]]></target>
8080
</trans-unit>
8181
<trans-unit id="the-response-status-code-should-be">
8282
<source><![CDATA[/^the response status code should be (?P<code>\d+)$/]]></source>

i18n/es.xliff

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@
115115
<target><![CDATA[/^debo estar en "(?P<page>[^"]+)"$/]]></target>
116116
</trans-unit>
117117
<trans-unit id="the-url-should-match">
118-
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
119-
<target><![CDATA[/^la URL debe seguir el patrón (?P<pattern>"([^"]|\\")*")$/]]></target>
118+
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/]]></source>
119+
<target><![CDATA[/^la URL debe seguir el patrón (?P<pattern>"(?:[^"]|\\")*")$/]]></target>
120120
</trans-unit>
121121
<trans-unit id="the-element-should-contain">
122122
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>

i18n/fr.xliff

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@
119119
<target><![CDATA[/^(?:|je )devrais être sur la page d'accueil$/]]></target>
120120
</trans-unit>
121121
<trans-unit id="the-url-should-match">
122-
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
123-
<target><![CDATA[/^l'(?i)url(?-i) devrait suivre le motif (?P<pattern>"([^"]|\\")*")$/]]></target>
122+
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/]]></source>
123+
<target><![CDATA[/^l'(?i)url(?-i) devrait suivre le motif (?P<pattern>"(?:[^"]|\\")*")$/]]></target>
124124
</trans-unit>
125125
<trans-unit id="the-element-should-contain">
126126
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>

i18n/id.xliff

+3-3
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@
131131
<target><![CDATA[/^(?:|saya )harus (?:|berada )di (?:|halaman )beranda$/]]></target>
132132
</trans-unit>
133133
<trans-unit id="the-url-should-match">
134-
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
135-
<target><![CDATA[/^url (?i)url(?-i) harus cocok dengan (?:|pola )(?P<pattern>"([^"]|\\")*")$/]]></target>
134+
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/]]></source>
135+
<target><![CDATA[/^url (?i)url(?-i) harus cocok dengan (?:|pola )(?P<pattern>"(?:[^"]|\\")*")$/]]></target>
136136
</trans-unit>
137137
<trans-unit id="the-element-should-contain">
138138
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>
@@ -181,7 +181,7 @@
181181
<trans-unit id="show-last-response">
182182
<source><![CDATA[/^show last response$/]]></source>
183183
<target><![CDATA[/^tampilkan respon terakhir$/]]></target>
184-
</trans-unit>
184+
</trans-unit>
185185
</body>
186186
</file>
187187
</xliff>

i18n/it.xliff

+2-2
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@
107107
<target><![CDATA[/^(?:|io )dovrei essere sulla pagina "(?P<page>[^"]+)"$/]]></target>
108108
</trans-unit>
109109
<trans-unit id="the-url-should-match">
110-
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
111-
<target><![CDATA[/^l'(?i)url(?-i) dovrebbe essere (?P<pattern>"([^"]|\\")*")$/]]></target>
110+
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/]]></source>
111+
<target><![CDATA[/^l'(?i)url(?-i) dovrebbe essere (?P<pattern>"(?:[^"]|\\")*")$/]]></target>
112112
</trans-unit>
113113
<trans-unit id="the-element-should-contain">
114114
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>

i18n/ja.xliff

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@
9999
<target><![CDATA[/^(?:|ユーザーが )(?P<page>[^\s]+) を表示していること$/u]]></target>
100100
</trans-unit>
101101
<trans-unit id="the-url-should-match">
102-
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
103-
<target><![CDATA[/^(?i)url(?-i)が (?P<pattern>"([^"]|\\")*") にマッチすること$/u]]></target>
102+
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/]]></source>
103+
<target><![CDATA[/^(?i)url(?-i)が (?P<pattern>"(?:[^"]|\\")*") にマッチすること$/u]]></target>
104104
</trans-unit>
105105
<trans-unit id="the-element-should-contain">
106106
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>

i18n/nl.xliff

+3-3
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@
115115
<target><![CDATA[/^moet (?:|ik )op "(?P<page>[^"]+)" zijn$/]]></target>
116116
</trans-unit>
117117
<trans-unit id="the-url-should-match">
118-
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
119-
<target><![CDATA[/^moet de url overeenkomen met (?P<pattern>"([^"]|\\")*")$/]]></target>
118+
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/]]></source>
119+
<target><![CDATA[/^moet de url overeenkomen met (?P<pattern>"(?:[^"]|\\")*")$/]]></target>
120120
</trans-unit>
121121
<trans-unit id="the-element-should-contain">
122122
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>
@@ -164,4 +164,4 @@
164164
</trans-unit>
165165
</body>
166166
</file>
167-
</xliff>
167+
</xliff>

i18n/pl.xliff

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@
9999
<target><![CDATA[/^(?:|że )powinienem być na stronie "(?P<page>[^"]+)"$/]]></target>
100100
</trans-unit>
101101
<trans-unit id="the-url-should-match">
102-
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
103-
<target><![CDATA[/^(?:url|adres) powinien odpowiadać (?P<pattern>"([^"]|\\")*")$/]]></target>
102+
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/]]></source>
103+
<target><![CDATA[/^(?:url|adres) powinien odpowiadać (?P<pattern>"(?:[^"]|\\")*")$/]]></target>
104104
</trans-unit>
105105
<trans-unit id="the-element-should-contain">
106106
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>

i18n/pt.xliff

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@
115115
<target><![CDATA[/^(?:|Eu )estar em "(?P<page>[^"]+)"$/]]></target>
116116
</trans-unit>
117117
<trans-unit id="the-url-should-match">
118-
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
119-
<target><![CDATA[/^a (?i)url(?-i) deve coincidir com (?P<pattern>"([^"]|\\")*")$/]]></target>
118+
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/]]></source>
119+
<target><![CDATA[/^a (?i)url(?-i) deve coincidir com (?P<pattern>"(?:[^"]|\\")*")$/]]></target>
120120
</trans-unit>
121121
<trans-unit id="the-element-should-contain">
122122
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>

i18n/ru.xliff

+2-2
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@
131131
<target><![CDATA[/^(?:|я )должен быть на главной странице/]]></target>
132132
</trans-unit>
133133
<trans-unit id="the-url-should-match">
134-
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
135-
<target><![CDATA[/^(?:url|адрес) должен соответствовать (?P<pattern>"([^"]|\\")*")$/]]></target>
134+
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/]]></source>
135+
<target><![CDATA[/^(?:url|адрес) должен соответствовать (?P<pattern>"(?:[^"]|\\")*")$/]]></target>
136136
</trans-unit>
137137
<trans-unit id="the-element-should-contain">
138138
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>

i18n/sk.xliff

+2-2
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@
107107
<target><![CDATA[/^(?:mal(?:|a) by som byť|by som mal(?:|a) byť|som|musím byť) na(?:| stránke) "(?P<page>[^"]+)"$/]]></target>
108108
</trans-unit>
109109
<trans-unit id="the-url-should-match">
110-
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
111-
<target><![CDATA[/^(?:url|adresa|link) (?:by mal(?:|a)|mal(?:|a) by|musí) zodpovedať(?:| vzoru) (?P<pattern>"([^"]|\\")*")$/]]></target>
110+
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/]]></source>
111+
<target><![CDATA[/^(?:url|adresa|link) (?:by mal(?:|a)|mal(?:|a) by|musí) zodpovedať(?:| vzoru) (?P<pattern>"(?:[^"]|\\")*")$/]]></target>
112112
</trans-unit>
113113
<trans-unit id="the-element-should-contain">
114114
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>

i18n/sv.xliff

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@
9595
<target><![CDATA[/^(?:|jag )skulle vara på "(?P<page>[^"]+)"$/]]></target>
9696
</trans-unit>
9797
<trans-unit id="the-url-should-match">
98-
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
99-
<target><![CDATA[/^webbadressen skulle matcha (?P<pattern>"([^"]|\\")*")$/]]></target>
98+
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/]]></source>
99+
<target><![CDATA[/^webbadressen skulle matcha (?P<pattern>"(?:[^"]|\\")*")$/]]></target>
100100
</trans-unit>
101101
<trans-unit id="the-element-should-contain">
102102
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>

i18n/zh-CN.xliff

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@
100100
<target><![CDATA[/^(?:|我)应该到了“(?P<page>[^\s]+)”$/]]></target>
101101
</trans-unit>
102102
<trans-unit id="the-url-should-match">
103-
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
104-
<target><![CDATA[/^(?i)url(?-i) 应该匹配“(?P<pattern>"([^"]|\\")*")”$/]]></target>
103+
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/]]></source>
104+
<target><![CDATA[/^(?i)url(?-i) 应该匹配“(?P<pattern>"(?:[^"]|\\")*")”$/]]></target>
105105
</trans-unit>
106106
<trans-unit id="the-element-should-contain">
107107
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>

src/Behat/MinkExtension/Context/MinkContext.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ public function assertHomepage()
211211
/**
212212
* Checks, that current page PATH matches regular expression.
213213
*
214-
* @Then /^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/
214+
* @Then /^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/
215215
*/
216216
public function assertUrlRegExp($pattern)
217217
{

src/Behat/MinkExtension/Context/MinkDictionary.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ public function assertHomepage()
302302
/**
303303
* Checks, that current page PATH matches regular expression.
304304
*
305-
* @Then /^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/
305+
* @Then /^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/
306306
*/
307307
public function assertUrlRegExp($pattern)
308308
{

0 commit comments

Comments
 (0)