diff --git a/lib/Cake/Test/Case/Console/Command/Task/ExtractTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/ExtractTaskTest.php index 66bc9c2db..1f4eb6108 100644 --- a/lib/Cake/Test/Case/Console/Command/Task/ExtractTaskTest.php +++ b/lib/Cake/Test/Case/Console/Command/Task/ExtractTaskTest.php @@ -152,7 +152,7 @@ class ExtractTaskTest extends CakeTestCase { $pattern .= 'msgid "Editing this Page"\nmsgstr ""/'; $this->assertRegExp($pattern, $result); - $pattern = '/\#: (\\\\|\/)extract\.ctp:18\nmsgid "'; + $pattern = '/\#: (\\\\|\/)extract\.ctp:22\nmsgid "'; $pattern .= 'Hot features!'; $pattern .= '\\\n - No Configuration: Set-up the database and let the magic begin'; $pattern .= '\\\n - Extremely Simple: Just look at the name...It\'s Cake'; @@ -160,6 +160,9 @@ class ExtractTaskTest extends CakeTestCase { $pattern .= '"\nmsgstr ""/'; $this->assertRegExp($pattern, $result); + $this->assertContains('msgid "double \\"quoted\\""', $result, 'Strings with quotes not handled correctly'); + $this->assertContains("msgid \"single 'quoted'\"", $result, 'Strings with quotes not handled correctly'); + // extract.ctp - reading the domain.pot $result = file_get_contents($this->path . DS . 'domain.pot'); diff --git a/lib/Cake/Test/test_app/View/Pages/extract.ctp b/lib/Cake/Test/test_app/View/Pages/extract.ctp index cba9b012f..3d89ffc9f 100644 --- a/lib/Cake/Test/test_app/View/Pages/extract.ctp +++ b/lib/Cake/Test/test_app/View/Pages/extract.ctp @@ -14,6 +14,10 @@ echo __dn('domain', 'You deleted %d message (domain).', 'You deleted %d messages echo __('Editing this Page'); echo __('You have %d new message.'); +// Contains quotes +echo __('double "quoted"'); +echo __("single 'quoted'"); + // Multiline __('Hot features!' . "\n - No Configuration:"