diff --git a/features/makephp.feature b/features/makephp.feature index 66f1271..49967a1 100644 --- a/features/makephp.feature +++ b/features/makephp.feature @@ -153,7 +153,6 @@ Feature: Generate PHP files from PO files And STDERR should be empty And the foo-plugin/foo-plugin-de_DE.l10n.php file should contain: """ - NULL,'plural-forms'=>'nplurals=2; plural=n != 1;','language'=>'de_DE','project-id-version'=>'Development (5.2.x)','pot-creation-date'=>'','po-revision-date'=>'2019-03-28 19:42+0300','x-generator'=>'Poedit 2.2.1','messages'=>['html_lang_attribute'=>'de-DE','text directionltr'=>'ltr','number_format_decimal_point'=>',','number_format_thousands_sep'=>'.','Update %s now'=>'Jetzt %s aktualisieren','[%1$s] Confirm Action: %2$s'=>'[%1$s] Aktion bestätigen: %2$s','[%s] Erasure Request Fulfilled'=>'[%s] Löschauftrag ausgeführt','[%s] Personal Data Export'=>'[%s] Export personenbezogener Daten']]; """ diff --git a/features/makepot.feature b/features/makepot.feature index f86d013..5849cba 100644 --- a/features/makepot.feature +++ b/features/makepot.feature @@ -99,6 +99,7 @@ Feature: Generate a POT file of a WordPress project Plugin Description """ + @skip-windows Scenario: Adds copyright comments When I run `wp scaffold plugin hello-world` And I run `date +"%Y"` @@ -112,6 +113,20 @@ Feature: Generate a POT file of a WordPress project # This file is distributed under the same license as the Hello World plugin. """ + @require-windows + Scenario: Adds copyright comments + When I run `wp scaffold plugin hello-world` + And I run `get-date -f yyyy` + Then STDOUT should not be empty + And save STDOUT as {YEAR} + + When I run `wp i18n make-pot wp-content/plugins/hello-world wp-content/plugins/hello-world/languages/hello-world.pot` + Then the wp-content/plugins/hello-world/languages/hello-world.pot file should contain: + """ + # Copyright (C) {YEAR} YOUR NAME HERE + # This file is distributed under the same license as the Hello World plugin. + """ + Scenario: Use the same license as the plugin Given an empty foo-plugin directory And a foo-plugin/foo-plugin.php file: @@ -1692,6 +1707,8 @@ Feature: Generate a POT file of a WordPress project msgid "Hello World JS" """ + # Because of the date command usage. + @skip-windows Scenario: Uses newer file headers when merging translations Given an empty foo-plugin directory And a foo-plugin/foo-plugin.pot file: @@ -2637,7 +2654,10 @@ Feature: Generate a POT file of a WordPress project __( 'Hello World', 'foo-plugin' ); """ - When I try `wp i18n make-pot foo-plugin --debug` + When I run `wp eval "echo DIRECTORY_SEPARATOR;"` + And save STDOUT as {DIRECTORY_SEPARATOR} + + And I try `wp i18n make-pot foo-plugin --debug` Then STDOUT should be: """ Plugin file detected. @@ -2653,7 +2673,7 @@ Feature: Generate a POT file of a WordPress project """ And STDERR should contain: """ - foo-plugin/foo-plugin.php + foo-plugin{DIRECTORY_SEPARATOR}foo-plugin.php """ And STDERR should contain: """ @@ -2707,7 +2727,10 @@ Feature: Generate a POT file of a WordPress project */ """ - When I try `wp i18n make-pot foo-theme --debug` + When I run `wp eval "echo DIRECTORY_SEPARATOR;"` + And save STDOUT as {DIRECTORY_SEPARATOR} + + And I try `wp i18n make-pot foo-theme --debug` Then STDOUT should be: """ Theme stylesheet detected. @@ -2723,7 +2746,7 @@ Feature: Generate a POT file of a WordPress project """ And STDERR should contain: """ - foo-theme/style.css + foo-theme{DIRECTORY_SEPARATOR}style.css """ And STDERR should contain: """