Browse files

Changed the regex delimiter for "The url should match"

Using / as a regex delimiter when matching an url is a pain because it
forces to escape all / in the url (and there more often / than " in
an URL).
  • Loading branch information...
1 parent e959b59 commit cfd002cbd889c0691133c82c6ec8f9a9e9cf431b @stof stof committed May 11, 2012
View
2 i18n/cs.xliff
@@ -99,7 +99,7 @@
<target><![CDATA[/^musím být na stránce "(?P<page>[^"]+)"$/]]></target>
</trans-unit>
<trans-unit id="the-url-should-match">
- <source><![CDATA[/^the url should match "(?P<pattern>(?:[^"]|\\")*)"$/]]></source>
+ <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">
View
2 i18n/de.xliff
@@ -99,7 +99,7 @@
<target><![CDATA[/^(?:|ich )sollte auf "(?P<page>[^"]+)" sein$/]]></target>
</trans-unit>
<trans-unit id="the-url-should-match">
- <source><![CDATA[/^the url should match "(?P<pattern>(?:[^"]|\\")*)"$/]]></source>
+ <source><![CDATA[/^the (?i)url(?-i) should match "(?P<pattern>(?:[^"]|\\")*)"$/]]></source>
<target><![CDATA[/^die Webadresse sollte mit "(?P<pattern>(?:[^"]|\\")*)" übereinstimmen$/]]></target>
</trans-unit>
<trans-unit id="the-element-should-contain">
View
2 i18n/es.xliff
@@ -99,7 +99,7 @@
<target><![CDATA[/^debo estar en "(?P<page>[^"]+)"$/]]></target>
</trans-unit>
<trans-unit id="the-url-should-match">
- <source><![CDATA[/^the url should match "(?P<pattern>(?:[^"]|\\")*)"$/]]></source>
+ <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">
View
4 i18n/fr.xliff
@@ -99,8 +99,8 @@
<target><![CDATA[/^(?:|je )devrais être sur "(?P<page>[^"]+)"$/]]></target>
</trans-unit>
<trans-unit id="the-url-should-match">
- <source><![CDATA[/^the url should match "(?P<pattern>(?:[^"]|\\")*)"$/]]></source>
- <target><![CDATA[/^l'url 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>
View
4 i18n/ja.xliff
@@ -99,8 +99,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>
View
2 i18n/nl.xliff
@@ -95,7 +95,7 @@
<target><![CDATA[/^moet (?:|ik )op "(?P<page>[^"]+)" zijn$/]]></target>
</trans-unit>
<trans-unit id="the-url-should-match">
- <source><![CDATA[/^the url should match "(?P<pattern>(?:[^"]|\\")*)"$/]]></source>
+ <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">
View
2 i18n/pl.xliff
@@ -99,7 +99,7 @@
<target><![CDATA[/^(?:|że )powinienem być na stronie "(?P<page>[^"]+)"$/]]></target>
</trans-unit>
<trans-unit id="the-url-should-match">
- <source><![CDATA[/^the url should match "(?P<pattern>(?:[^"]|\\")*)"$/]]></source>
+ <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">
View
2 i18n/pt.xliff
@@ -95,7 +95,7 @@
<target><![CDATA[/^(?:|Eu )devo de estar em "(?P<page>[^"]+)"$/]]></target>
</trans-unit>
<trans-unit id="the-url-should-match">
- <source><![CDATA[/^the url should match "(?P<pattern>(?:[^"]|\\")*)"$/]]></source>
+ <source><![CDATA[/^the (?i)url(?-i) should match "(?P<pattern>(?:[^"]|\\")*)"$/]]></source>
<target><![CDATA[/^o endereço deve coincidir com "(?P<pattern>(?:[^"]|\\")*)"$/]]></target>
</trans-unit>
<trans-unit id="the-element-should-contain">
View
2 i18n/ru.xliff
@@ -107,7 +107,7 @@
<target><![CDATA[/^(?:|я )должен быть на странице "(?P<page>[^"]+)"$/]]></target>
</trans-unit>
<trans-unit id="the-url-should-match">
- <source><![CDATA[/^the (?i)url(?-i) should match (?P<pattern>\/([^\/]|\\\/)*\/)$/]]></source>
+ <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">
View
2 i18n/sv.xliff
@@ -95,7 +95,7 @@
<target><![CDATA[/^(?:|jag )skulle vara på "(?P<page>[^"]+)"$/]]></target>
</trans-unit>
<trans-unit id="the-url-should-match">
- <source><![CDATA[/^the url should match "(?P<pattern>(?:[^"]|\\")*)"$/]]></source>
+ <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">
View
2 src/Behat/MinkExtension/Context/MinkContext.php
@@ -186,7 +186,7 @@ public function assertPageAddress($page)
/**
* 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)
{
View
2 src/Behat/MinkExtension/Context/MinkDictionary.php
@@ -254,7 +254,7 @@ public function assertPageAddress($page)
/**
* 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)
{

0 comments on commit cfd002c

Please sign in to comment.