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

Commit

Permalink
Fixed the regex of the step matching url to avoid breaking formatters
Browse files Browse the repository at this point in the history
The inner group needs to be non-capturing. Fixes #99
  • Loading branch information
stof committed Apr 27, 2014
1 parent 5fd83a8 commit 0642b68
Show file tree
Hide file tree
Showing 17 changed files with 34 additions and 34 deletions.
4 changes: 2 additions & 2 deletions i18n/cs.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@
<target><![CDATA[/^musím být na stránce "(?P<page>[^"]+)"$/]]></target>
</trans-unit>
<trans-unit id="the-url-should-match">
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
<target><![CDATA[/^(?:url|adresa|url adresa) musí mít tvar (?P<pattern>"([^"]|\\")*")$/]]></target>
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/]]></source>
<target><![CDATA[/^(?:url|adresa|url adresa) musí mít tvar (?P<pattern>"(?:[^"]|\\")*")$/]]></target>
</trans-unit>
<trans-unit id="the-element-should-contain">
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>
Expand Down
4 changes: 2 additions & 2 deletions i18n/da.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@
<target><![CDATA[/^(?:|skulle jeg )være på hjemmesiden$/]]></target>
</trans-unit>
<trans-unit id="the-url-should-match">
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
<target><![CDATA[/^skulle webadressen matche (?P<pattern>"([^"]|\\")*")$/]]></target>
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/]]></source>
<target><![CDATA[/^skulle webadressen matche (?P<pattern>"(?:[^"]|\\")*")$/]]></target>
</trans-unit>
<trans-unit id="the-element-should-contain">
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>
Expand Down
4 changes: 2 additions & 2 deletions i18n/de.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@
<target><![CDATA[/^(?:|ich )sollte (?:|ich )auf "(?P<page>[^"]+)" sein$/]]></target>
</trans-unit>
<trans-unit id="the-url-should-match">
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
<target><![CDATA[/^(?:|sollte )die Webadresse (?:|sollte )mit (?P<pattern>"([^"]|\\")*") übereinstimmen$/]]></target>
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/]]></source>
<target><![CDATA[/^(?:|sollte )die Webadresse (?:|sollte )mit (?P<pattern>"(?:[^"]|\\")*") übereinstimmen$/]]></target>
</trans-unit>
<trans-unit id="the-response-status-code-should-be">
<source><![CDATA[/^the response status code should be (?P<code>\d+)$/]]></source>
Expand Down
4 changes: 2 additions & 2 deletions i18n/es.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@
<target><![CDATA[/^debo estar en "(?P<page>[^"]+)"$/]]></target>
</trans-unit>
<trans-unit id="the-url-should-match">
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
<target><![CDATA[/^la URL debe seguir el patrón (?P<pattern>"([^"]|\\")*")$/]]></target>
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/]]></source>
<target><![CDATA[/^la URL debe seguir el patrón (?P<pattern>"(?:[^"]|\\")*")$/]]></target>
</trans-unit>
<trans-unit id="the-element-should-contain">
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>
Expand Down
4 changes: 2 additions & 2 deletions i18n/fr.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@
<target><![CDATA[/^(?:|je )devrais être sur la page d'accueil$/]]></target>
</trans-unit>
<trans-unit id="the-url-should-match">
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
<target><![CDATA[/^l'(?i)url(?-i) devrait suivre le motif (?P<pattern>"([^"]|\\")*")$/]]></target>
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/]]></source>
<target><![CDATA[/^l'(?i)url(?-i) devrait suivre le motif (?P<pattern>"(?:[^"]|\\")*")$/]]></target>
</trans-unit>
<trans-unit id="the-element-should-contain">
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>
Expand Down
6 changes: 3 additions & 3 deletions i18n/id.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@
<target><![CDATA[/^(?:|saya )harus (?:|berada )di (?:|halaman )beranda$/]]></target>
</trans-unit>
<trans-unit id="the-url-should-match">
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
<target><![CDATA[/^url (?i)url(?-i) harus cocok dengan (?:|pola )(?P<pattern>"([^"]|\\")*")$/]]></target>
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/]]></source>
<target><![CDATA[/^url (?i)url(?-i) harus cocok dengan (?:|pola )(?P<pattern>"(?:[^"]|\\")*")$/]]></target>
</trans-unit>
<trans-unit id="the-element-should-contain">
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>
Expand Down Expand Up @@ -181,7 +181,7 @@
<trans-unit id="show-last-response">
<source><![CDATA[/^show last response$/]]></source>
<target><![CDATA[/^tampilkan respon terakhir$/]]></target>
</trans-unit>
</trans-unit>
</body>
</file>
</xliff>
4 changes: 2 additions & 2 deletions i18n/it.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@
<target><![CDATA[/^(?:|io )dovrei essere sulla pagina "(?P<page>[^"]+)"$/]]></target>
</trans-unit>
<trans-unit id="the-url-should-match">
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
<target><![CDATA[/^l'(?i)url(?-i) dovrebbe essere (?P<pattern>"([^"]|\\")*")$/]]></target>
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/]]></source>
<target><![CDATA[/^l'(?i)url(?-i) dovrebbe essere (?P<pattern>"(?:[^"]|\\")*")$/]]></target>
</trans-unit>
<trans-unit id="the-element-should-contain">
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>
Expand Down
4 changes: 2 additions & 2 deletions i18n/ja.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@
<target><![CDATA[/^(?:|ユーザーが )(?P<page>[^\s]+) を表示していること$/u]]></target>
</trans-unit>
<trans-unit id="the-url-should-match">
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
<target><![CDATA[/^(?i)url(?-i)が (?P<pattern>"([^"]|\\")*") にマッチすること$/u]]></target>
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/]]></source>
<target><![CDATA[/^(?i)url(?-i)が (?P<pattern>"(?:[^"]|\\")*") にマッチすること$/u]]></target>
</trans-unit>
<trans-unit id="the-element-should-contain">
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>
Expand Down
6 changes: 3 additions & 3 deletions i18n/nl.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@
<target><![CDATA[/^moet (?:|ik )op "(?P<page>[^"]+)" zijn$/]]></target>
</trans-unit>
<trans-unit id="the-url-should-match">
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
<target><![CDATA[/^moet de url overeenkomen met (?P<pattern>"([^"]|\\")*")$/]]></target>
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/]]></source>
<target><![CDATA[/^moet de url overeenkomen met (?P<pattern>"(?:[^"]|\\")*")$/]]></target>
</trans-unit>
<trans-unit id="the-element-should-contain">
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>
Expand Down Expand Up @@ -164,4 +164,4 @@
</trans-unit>
</body>
</file>
</xliff>
</xliff>
4 changes: 2 additions & 2 deletions i18n/pl.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@
<target><![CDATA[/^(?:|że )powinienem być na stronie "(?P<page>[^"]+)"$/]]></target>
</trans-unit>
<trans-unit id="the-url-should-match">
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
<target><![CDATA[/^(?:url|adres) powinien odpowiadać (?P<pattern>"([^"]|\\")*")$/]]></target>
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/]]></source>
<target><![CDATA[/^(?:url|adres) powinien odpowiadać (?P<pattern>"(?:[^"]|\\")*")$/]]></target>
</trans-unit>
<trans-unit id="the-element-should-contain">
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>
Expand Down
4 changes: 2 additions & 2 deletions i18n/pt.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@
<target><![CDATA[/^(?:|Eu )estar em "(?P<page>[^"]+)"$/]]></target>
</trans-unit>
<trans-unit id="the-url-should-match">
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
<target><![CDATA[/^a (?i)url(?-i) deve coincidir com (?P<pattern>"([^"]|\\")*")$/]]></target>
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/]]></source>
<target><![CDATA[/^a (?i)url(?-i) deve coincidir com (?P<pattern>"(?:[^"]|\\")*")$/]]></target>
</trans-unit>
<trans-unit id="the-element-should-contain">
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>
Expand Down
4 changes: 2 additions & 2 deletions i18n/ru.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@
<target><![CDATA[/^(?:|я )должен быть на главной странице/]]></target>
</trans-unit>
<trans-unit id="the-url-should-match">
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
<target><![CDATA[/^(?:url|адрес) должен соответствовать (?P<pattern>"([^"]|\\")*")$/]]></target>
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/]]></source>
<target><![CDATA[/^(?:url|адрес) должен соответствовать (?P<pattern>"(?:[^"]|\\")*")$/]]></target>
</trans-unit>
<trans-unit id="the-element-should-contain">
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>
Expand Down
4 changes: 2 additions & 2 deletions i18n/sk.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@
<target><![CDATA[/^(?:mal(?:|a) by som byť|by som mal(?:|a) byť|som|musím byť) na(?:| stránke) "(?P<page>[^"]+)"$/]]></target>
</trans-unit>
<trans-unit id="the-url-should-match">
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
<target><![CDATA[/^(?:url|adresa|link) (?:by mal(?:|a)|mal(?:|a) by|musí) zodpovedať(?:| vzoru) (?P<pattern>"([^"]|\\")*")$/]]></target>
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/]]></source>
<target><![CDATA[/^(?:url|adresa|link) (?:by mal(?:|a)|mal(?:|a) by|musí) zodpovedať(?:| vzoru) (?P<pattern>"(?:[^"]|\\")*")$/]]></target>
</trans-unit>
<trans-unit id="the-element-should-contain">
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>
Expand Down
4 changes: 2 additions & 2 deletions i18n/sv.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@
<target><![CDATA[/^(?:|jag )skulle vara på "(?P<page>[^"]+)"$/]]></target>
</trans-unit>
<trans-unit id="the-url-should-match">
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
<target><![CDATA[/^webbadressen skulle matcha (?P<pattern>"([^"]|\\")*")$/]]></target>
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/]]></source>
<target><![CDATA[/^webbadressen skulle matcha (?P<pattern>"(?:[^"]|\\")*")$/]]></target>
</trans-unit>
<trans-unit id="the-element-should-contain">
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>
Expand Down
4 changes: 2 additions & 2 deletions i18n/zh-CN.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@
<target><![CDATA[/^(?:|我)应该到了“(?P<page>[^\s]+)”$/]]></target>
</trans-unit>
<trans-unit id="the-url-should-match">
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/]]></source>
<target><![CDATA[/^(?i)url(?-i) 应该匹配“(?P<pattern>"([^"]|\\")*")”$/]]></target>
<source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/]]></source>
<target><![CDATA[/^(?i)url(?-i) 应该匹配“(?P<pattern>"(?:[^"]|\\")*")”$/]]></target>
</trans-unit>
<trans-unit id="the-element-should-contain">
<source><![CDATA[/^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/]]></source>
Expand Down
2 changes: 1 addition & 1 deletion src/Behat/MinkExtension/Context/MinkContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public function assertHomepage()
/**
* Checks, that current page PATH matches regular expression.
*
* @Then /^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/
* @Then /^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/
*/
public function assertUrlRegExp($pattern)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Behat/MinkExtension/Context/MinkDictionary.php
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ public function assertHomepage()
/**
* Checks, that current page PATH matches regular expression.
*
* @Then /^the (?i)url(?-i) should match (?P<pattern>"([^"]|\\")*")$/
* @Then /^the (?i)url(?-i) should match (?P<pattern>"(?:[^"]|\\")*")$/
*/
public function assertUrlRegExp($pattern)
{
Expand Down

0 comments on commit 0642b68

Please sign in to comment.