File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -148,3 +148,26 @@ Feature: Generate a distribution archive of a project
148148 | format | extension | extract |
149149 | zip | zip | unzip |
150150 | targz | tar .gz | tar -zxvf |
151+
152+ Scenario : Create directories automatically if requested
153+ Given a WP install
154+
155+ When I run `wp scaffold plugin hello-world`
156+ Then the wp-content/plugins/hello-world directory should exist
157+ And the wp-content/plugins/hello-world/hello-world.php file should exist
158+ And the wp-content/plugins/hello-world/.travis.yml file should exist
159+ And the wp-content/plugins/hello-world/bin directory should exist
160+
161+ When I try `wp dist-archive wp-content/plugins/hello-world {RUN_DIR}/some/nested/folder/hello-world.zip`
162+ Then STDERR should contain:
163+ """
164+ Error: Target directory does not exist
165+ """
166+
167+ When I run `wp dist-archive --create-target-dir wp-content/plugins/hello-world {RUN_DIR}/some/nested/folder/hello-world.zip`
168+ Then STDOUT should be:
169+ """
170+ Success: Created hello-world.zip
171+ """
172+ And STDERR should be empty
173+ And the {RUN_DIR}/some/nested/folder/hello-world.zip file should exist
You can’t perform that action at this time.
0 commit comments