@@ -11,10 +11,7 @@ Feature: Generate a distribution archive of a project
1111 And the wp-content/plugins/hello-world/bin directory should exist
1212
1313 When I run `wp dist-archive wp-content/plugins/hello-world`
14- Then STDOUT should be:
15- """
16- Success: Created hello-world.0.1.0.zip
17- """
14+ Then STDOUT should match /^Success: Created hello-world.0.1.0.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
1815 And STDERR should be empty
1916 And the wp-content/plugins/hello-world.0.1.0.zip file should exist
2017
@@ -37,10 +34,7 @@ Feature: Generate a distribution archive of a project
3734 And the wp-content/plugins/hello-world/bin directory should exist
3835
3936 When I run `wp dist-archive wp-content/plugins/hello-world --format=targz`
40- Then STDOUT should be:
41- """
42- Success: Created hello-world.0.1.0.tar.gz
43- """
37+ Then STDOUT should match /^Success: Created hello-world.0.1.0.tar.gz \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
4438 And STDERR should be empty
4539 And the wp-content/plugins/hello-world.0.1.0.tar.gz file should exist
4640
@@ -63,10 +57,7 @@ Feature: Generate a distribution archive of a project
6357 And the wp-content/plugins/hello-world/bin directory should exist
6458
6559 When I run `wp dist-archive wp-content/plugins/hello-world hello-world.zip`
66- Then STDOUT should be:
67- """
68- Success: Created hello-world.zip
69- """
60+ Then STDOUT should match /^Success: Created hello-world.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
7061 And the wp-content/plugins/hello-world.zip file should exist
7162 And the wp-content/plugins/hello-world.0.1.0.zip file should not exist
7263
@@ -80,10 +71,7 @@ Feature: Generate a distribution archive of a project
8071 And the wp-content/plugins/hello-world/bin directory should exist
8172
8273 When I run `wp dist-archive wp-content/plugins/hello-world wp-content`
83- Then STDOUT should be:
84- """
85- Success: Created hello-world.0.1.0.zip
86- """
74+ Then STDOUT should match /^Success: Created hello-world.0.1.0.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
8775 And the wp-content/hello-world.0.1.0.zip file should exist
8876 And the wp-content/plugins/hello-world.0.1.0.zip file should not exist
8977
@@ -100,10 +88,7 @@ Feature: Generate a distribution archive of a project
10088 Then the subdir directory should exist
10189
10290 When I run `wp dist-archive wp-content/plugins/hello-world ./subdir/hello-world.zip`
103- Then STDOUT should be:
104- """
105- Success: Created hello-world.zip
106- """
91+ Then STDOUT should match /^Success: Created hello-world.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
10792 And STDERR should be empty
10893 And the {RUN_DIR}/subdir/hello-world.zip file should exist
10994
@@ -117,10 +102,7 @@ Feature: Generate a distribution archive of a project
117102 And the wp-content/plugins/hello-world/bin directory should exist
118103
119104 When I run `wp dist-archive wp-content/plugins/hello-world {RUN_DIR}/wp-content/`
120- Then STDOUT should be:
121- """
122- Success: Created hello-world.0.1.0.zip
123- """
105+ Then STDOUT should match /^Success: Created hello-world.0.1.0.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
124106 And STDERR should be empty
125107 And the {RUN_DIR}/wp-content/hello-world.0.1.0.zip file should exist
126108
@@ -147,10 +129,7 @@ Feature: Generate a distribution archive of a project
147129 """
148130
149131 When I run `wp dist-archive foo`
150- Then STDOUT should be:
151- """
152- Success: Created foo.0.2.0-alpha.zip
153- """
132+ Then STDOUT should match /^Success: Created foo.0.2.0-alpha.zip \(Size: \d* [a-zA-Z]{1,3}\)$/
154133 And the foo.0.2.0-alpha.zip file should exist
155134
156135 When I run `rm -rf foo`
@@ -178,10 +157,7 @@ Feature: Generate a distribution archive of a project
178157 """
179158
180159 When I run `wp dist-archive --create-target-dir wp-content/plugins/hello-world {RUN_DIR}/some/nested/folder/hello-world.zip`
181- Then STDOUT should be:
182- """
183- Success: Created hello-world.zip
184- """
160+ Then STDOUT should match /^Success: Created hello-world.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
185161 And STDERR should be empty
186162 And the {RUN_DIR}/some/nested/folder/hello-world.zip file should exist
187163
@@ -195,10 +171,7 @@ Feature: Generate a distribution archive of a project
195171 And the wp-content/plugins/hello-world/bin directory should exist
196172
197173 When I run `wp dist-archive . {RUN_DIR}/hello-world.zip` from 'wp-content/plugins/hello-world'
198- Then STDOUT should be:
199- """
200- Success: Created hello-world.zip
201- """
174+ Then STDOUT should match /^Success: Created hello-world.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
202175 And STDERR should be empty
203176 And the {RUN_DIR}/hello-world.zip file should exist
204177
@@ -212,10 +185,7 @@ Feature: Generate a distribution archive of a project
212185 And the wp-content/plugins/hello-world/bin directory should exist
213186
214187 When I run `wp dist-archive . hello-world.zip` from 'wp-content/plugins/hello-world'
215- Then STDOUT should be:
216- """
217- Success: Created hello-world.zip
218- """
188+ Then STDOUT should match /^Success: Created hello-world.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
219189 And STDERR should be empty
220190 And the {RUN_DIR}/wp-content/plugins/hello-world.zip file should exist
221191
@@ -229,10 +199,7 @@ Feature: Generate a distribution archive of a project
229199 And the wp-content/plugins/hello-world/bin directory should exist
230200
231201 When I run `wp dist-archive . ./hello-world.zip` from 'wp-content/plugins/hello-world'
232- Then STDOUT should be:
233- """
234- Success: Created hello-world.zip
235- """
202+ Then STDOUT should match /^Success: Created hello-world.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
236203 And STDERR should be empty
237204 And the {RUN_DIR}/wp-content/plugins/hello-world/hello-world.zip file should exist
238205
@@ -246,10 +213,7 @@ Feature: Generate a distribution archive of a project
246213 And the wp-content/plugins/hello-world/bin directory should exist
247214
248215 When I run `wp dist-archive wp-content/plugins/hello-world .`
249- Then STDOUT should be:
250- """
251- Success: Created hello-world.0.1.0.zip
252- """
216+ Then STDOUT should match /^Success: Created hello-world.0.1.0.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
253217 And STDERR should be empty
254218 And the {RUN_DIR}/hello-world.0.1.0.zip file should exist
255219
@@ -263,10 +227,7 @@ Feature: Generate a distribution archive of a project
263227 And the wp-content/plugins/hello-world/bin directory should exist
264228
265229 When I run `wp dist-archive wp-content/plugins/hello-world --plugin-dirname=foobar-world`
266- Then STDOUT should be:
267- """
268- Success: Created foobar-world.0.1.0.zip
269- """
230+ Then STDOUT should match /^Success: Created foobar-world.0.1.0.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
270231 And STDERR should be empty
271232 And the wp-content/plugins/foobar-world.0.1.0.zip file should exist
272233
@@ -292,10 +253,7 @@ Feature: Generate a distribution archive of a project
292253 Then STDERR should be empty
293254
294255 When I run `wp dist-archive wp-content/plugins/hello-world`
295- Then STDOUT should be:
296- """
297- Success: Created hello-world.0.2.0.zip
298- """
256+ Then STDOUT should match /^Success: Created hello-world.0.2.0.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
299257 And STDERR should be empty
300258 And the wp-content/plugins/hello-world.0.2.0.zip file should exist
301259
@@ -393,10 +351,7 @@ Feature: Generate a distribution archive of a project
393351 And the wp-content/plugins/hello-world/bin directory should exist
394352
395353 When I run `wp dist-archive wp-content/plugins/hello-world --filename-format={name}-{version}`
396- Then STDOUT should be:
397- """
398- Success: Created hello-world-0.1.0.zip
399- """
354+ Then STDOUT should match /^Success: Created hello-world-0.1.0.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
400355 And STDERR should be empty
401356 And the wp-content/plugins/hello-world-0.1.0.zip file should exist
402357
@@ -410,10 +365,7 @@ Feature: Generate a distribution archive of a project
410365 And the wp-content/plugins/hello-world/bin directory should exist
411366
412367 When I run `wp dist-archive wp-content/plugins/hello-world hello-world.zip --filename-format={name}-{version}`
413- Then STDOUT should be:
414- """
415- Success: Created hello-world.zip
416- """
368+ Then STDOUT should match /^Success: Created hello-world.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
417369 And STDERR should be empty
418370 And the wp-content/plugins/hello-world.zip file should exist
419371 And the wp-content/plugins/hello-world-0.1.0.zip file should not exist
@@ -431,10 +383,7 @@ Feature: Generate a distribution archive of a project
431383 """
432384
433385 When I run `wp dist-archive foo --filename-format={name}-{version}`
434- Then STDOUT should be:
435- """
436- Success: Created foo.zip
437- """
386+ Then STDOUT should match /^Success: Created foo.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
438387 And STDERR should be empty
439388 And the foo.zip file should exist
440389
@@ -451,10 +400,7 @@ Feature: Generate a distribution archive of a project
451400 Then the subdir directory should exist
452401
453402 When I run `wp dist-archive wp-content/plugins/hello-world ./subdir/hello-world-dist.zip`
454- Then STDOUT should be:
455- """
456- Success: Created hello-world-dist.zip
457- """
403+ Then STDOUT should match /^Success: Created hello-world-dist.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
458404 And STDERR should be empty
459405 And the {RUN_DIR}/subdir/hello-world-dist.zip file should exist
460406
0 commit comments