@@ -396,14 +396,51 @@ Feature: Download WordPress
396
396
And the wp-content/plugins directory should not exist
397
397
And the wp-content/themes directory should not exist
398
398
399
+ Scenario : Core download without extract parameter should unzip the download file
400
+ Given an empty directory
401
+
402
+ When I run `wp core download --version=4.5 --locale=de_DE`
403
+ Then the wp-content directory should exist
404
+ And the wordpress-4.5-de_DE.tar.gz file should not exist
405
+
399
406
Scenario : Core download with extract parameter should unzip the download file
400
407
Given an empty directory
401
408
402
- When I run `wp core download --extract`
409
+ When I run `wp core download --version=4.5 --locale=de_DE -- extract`
403
410
Then the wp-content directory should exist
411
+ And the wordpress-4.5-de_DE.tar.gz file should not exist
412
+
413
+ Scenario : Core download with extract parameter should unzip the download file (already cached)
414
+ Given an empty directory
415
+
416
+ When I run `wp core download --version=4.5 --locale=de_DE --extract`
417
+ And I run `rm -rf *`
418
+ And I run `wp core download --version=4.5 --locale=de_DE --extract`
419
+ Then the wp-content directory should exist
420
+ And the wordpress-4.5-de_DE.tar.gz file should not exist
404
421
405
422
Scenario : Core download with no-extract should not unzip the download file
406
423
Given an empty directory
407
424
408
- When I run `wp core download --no-extract`
425
+ When I run `wp core download --version=4.5 --locale=de_DE --no-extract`
426
+ Then the wp-content directory should not exist
427
+ And the wordpress-4.5-de_DE.tar.gz file should exist
428
+
429
+ Scenario : Core download with no-extract should not unzip the download file (already cached)
430
+ Given an empty directory
431
+
432
+ When I run `wp core download --version=4.5 --locale=de_DE --no-extract`
433
+ And I run `rm -rf wordpress-4.5-de_DE.tar.gz`
434
+ And I run `wp core download --version=4.5 --locale=de_DE --no-extract`
409
435
Then the wp-content directory should not exist
436
+ And the wordpress-4.5-de_DE.tar.gz file should exist
437
+
438
+ Scenario : Error when using both --skip-content and --no-extract
439
+ Given an empty directory
440
+
441
+ When I try `wp core download --skip-content --no-extract`
442
+ Then STDERR should contain:
443
+ """
444
+ Error: Cannot use both --skip-content and --no-extract at the same time.
445
+ """
446
+ And the return code should be 1
0 commit comments