From cfd002cbd889c0691133c82c6ec8f9a9e9cf431b Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Fri, 11 May 2012 22:00:46 +0200 Subject: [PATCH] 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). --- i18n/cs.xliff | 2 +- i18n/de.xliff | 2 +- i18n/es.xliff | 2 +- i18n/fr.xliff | 4 ++-- i18n/ja.xliff | 4 ++-- i18n/nl.xliff | 2 +- i18n/pl.xliff | 2 +- i18n/pt.xliff | 2 +- i18n/ru.xliff | 2 +- i18n/sv.xliff | 2 +- src/Behat/MinkExtension/Context/MinkContext.php | 2 +- src/Behat/MinkExtension/Context/MinkDictionary.php | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/i18n/cs.xliff b/i18n/cs.xliff index 01d5afe..109c8f8 100644 --- a/i18n/cs.xliff +++ b/i18n/cs.xliff @@ -99,7 +99,7 @@ [^"]+)"$/]]> - (?:[^"]|\\")*)"$/]]> + (?:[^"]|\\")*)"$/]]> (?:[^"]|\\")*)"$/]]> diff --git a/i18n/de.xliff b/i18n/de.xliff index f74ded4..07811df 100644 --- a/i18n/de.xliff +++ b/i18n/de.xliff @@ -99,7 +99,7 @@ [^"]+)" sein$/]]> - (?:[^"]|\\")*)"$/]]> + (?:[^"]|\\")*)"$/]]> (?:[^"]|\\")*)" übereinstimmen$/]]> diff --git a/i18n/es.xliff b/i18n/es.xliff index f2e387a..1fc0f7a 100644 --- a/i18n/es.xliff +++ b/i18n/es.xliff @@ -99,7 +99,7 @@ [^"]+)"$/]]> - (?:[^"]|\\")*)"$/]]> + (?:[^"]|\\")*)"$/]]> (?:[^"]|\\")*)"$/]]> diff --git a/i18n/fr.xliff b/i18n/fr.xliff index f0d32ac..6171698 100644 --- a/i18n/fr.xliff +++ b/i18n/fr.xliff @@ -99,8 +99,8 @@ [^"]+)"$/]]> - (?:[^"]|\\")*)"$/]]> - (?:[^"]|\\")*)"$/]]> + (?:[^"]|\\")*)"$/]]> + (?:[^"]|\\")*)"$/]]> [^"]*)" element should contain "(?P(?:[^"]|\\")*)"$/]]> diff --git a/i18n/ja.xliff b/i18n/ja.xliff index 24f78c4..35b6247 100644 --- a/i18n/ja.xliff +++ b/i18n/ja.xliff @@ -99,8 +99,8 @@ [^\s]+) を表示していること$/]]> - \/([^\/]|\\\/)*\/)$/]]> - \/([^\/]|\\\/)*\/)" にマッチすること$/]]> + "([^"]|\\")*")$/]]> + "([^"]|\\")*") にマッチすること$/]]> [^"]*)" element should contain "(?P(?:[^"]|\\")*)"$/]]> diff --git a/i18n/nl.xliff b/i18n/nl.xliff index 6723a4a..527590b 100644 --- a/i18n/nl.xliff +++ b/i18n/nl.xliff @@ -95,7 +95,7 @@ [^"]+)" zijn$/]]> - (?:[^"]|\\")*)"$/]]> + (?:[^"]|\\")*)"$/]]> (?:[^"]|\\")*)"$/]]> diff --git a/i18n/pl.xliff b/i18n/pl.xliff index 7481f31..572bad6 100644 --- a/i18n/pl.xliff +++ b/i18n/pl.xliff @@ -99,7 +99,7 @@ [^"]+)"$/]]> - (?:[^"]|\\")*)"$/]]> + (?:[^"]|\\")*)"$/]]> (?:[^"]|\\")*)"$/]]> diff --git a/i18n/pt.xliff b/i18n/pt.xliff index 9193ce8..532eeeb 100644 --- a/i18n/pt.xliff +++ b/i18n/pt.xliff @@ -95,7 +95,7 @@ [^"]+)"$/]]> - (?:[^"]|\\")*)"$/]]> + (?:[^"]|\\")*)"$/]]> (?:[^"]|\\")*)"$/]]> diff --git a/i18n/ru.xliff b/i18n/ru.xliff index 9111b1f..cc5102c 100644 --- a/i18n/ru.xliff +++ b/i18n/ru.xliff @@ -107,7 +107,7 @@ [^"]+)"$/]]> - \/([^\/]|\\\/)*\/)$/]]> + "([^"]|\\")*")$/]]> (?:[^"]|\\")*)"$/]]> diff --git a/i18n/sv.xliff b/i18n/sv.xliff index 58e0f9a..c2b0ba5 100644 --- a/i18n/sv.xliff +++ b/i18n/sv.xliff @@ -95,7 +95,7 @@ [^"]+)"$/]]> - (?:[^"]|\\")*)"$/]]> + (?:[^"]|\\")*)"$/]]> (?:[^"]|\\")*)"$/]]> diff --git a/src/Behat/MinkExtension/Context/MinkContext.php b/src/Behat/MinkExtension/Context/MinkContext.php index 0bbf7b6..80fad9e 100644 --- a/src/Behat/MinkExtension/Context/MinkContext.php +++ b/src/Behat/MinkExtension/Context/MinkContext.php @@ -186,7 +186,7 @@ class MinkContext extends RawMinkContext implements TranslatedContextInterface /** * Checks, that current page PATH matches regular expression. * - * @Then /^the (?i)url(?-i) should match (?P\/([^\/]|\\\/)*\/)$/ + * @Then /^the (?i)url(?-i) should match (?P"([^"]|\\")*")$/ */ public function assertUrlRegExp($pattern) { diff --git a/src/Behat/MinkExtension/Context/MinkDictionary.php b/src/Behat/MinkExtension/Context/MinkDictionary.php index e492a08..b37cc44 100644 --- a/src/Behat/MinkExtension/Context/MinkDictionary.php +++ b/src/Behat/MinkExtension/Context/MinkDictionary.php @@ -254,7 +254,7 @@ trait MinkDictionary /** * Checks, that current page PATH matches regular expression. * - * @Then /^the (?i)url(?-i) should match (?P\/([^\/]|\\\/)*\/)$/ + * @Then /^the (?i)url(?-i) should match (?P"([^"]|\\")*")$/ */ public function assertUrlRegExp($pattern) {