Skip to content

Commit 286fec8

Browse files
committed
More quotes
1 parent 83e2c42 commit 286fec8

File tree

3 files changed

+39
-9
lines changed

3 files changed

+39
-9
lines changed

features/post-block.feature

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,7 +1152,11 @@ Feature: Manage blocks in post content
11521152
@require-wp-5.0
11531153
Scenario: Parse post with classic content (no blocks)
11541154
Given a WP install
1155-
When I run `wp post create --post_title='Classic' --post_content='<p>Just HTML, no blocks</p>' --porcelain`
1155+
And a block-content.txt file:
1156+
"""
1157+
<p>Just HTML, no blocks</p>
1158+
"""
1159+
When I run `wp post create block-content.txt --post_title='Classic' --porcelain`
11561160
Then save STDOUT as {POST_ID}
11571161

11581162
When I run `wp post block parse {POST_ID}`
@@ -1164,7 +1168,11 @@ Feature: Manage blocks in post content
11641168
@require-wp-5.0
11651169
Scenario: Render dynamic block
11661170
Given a WP install
1167-
When I run `wp post create --post_title='Dynamic' --post_content='<!-- wp:archives /-->' --porcelain`
1171+
And a block-content.txt file:
1172+
"""
1173+
<!-- wp:archives /-->
1174+
"""
1175+
When I run `wp post create block-content.txt --post_title='Dynamic' --porcelain`
11681176
Then save STDOUT as {POST_ID}
11691177

11701178
When I run `wp post block render {POST_ID}`
@@ -1325,7 +1333,11 @@ Feature: Manage blocks in post content
13251333
@require-wp-5.0
13261334
Scenario: Parse deeply nested blocks
13271335
Given a WP install
1328-
When I run `wp post create --post_title='Deep' --post_content='<!-- wp:group --><!-- wp:columns --><!-- wp:column --><!-- wp:group --><!-- wp:paragraph --><p>Deep</p><!-- /wp:paragraph --><!-- /wp:group --><!-- /wp:column --><!-- /wp:columns --><!-- /wp:group -->' --porcelain`
1336+
And a block-content.txt file:
1337+
"""
1338+
<!-- wp:group --><!-- wp:columns --><!-- wp:column --><!-- wp:group --><!-- wp:paragraph --><p>Deep</p><!-- /wp:paragraph --><!-- /wp:group --><!-- /wp:column --><!-- /wp:columns --><!-- /wp:group -->
1339+
"""
1340+
When I run `wp post create block-content.txt --post_title='Deep' --porcelain`
13291341
Then save STDOUT as {POST_ID}
13301342

13311343
When I run `wp post block parse {POST_ID}`
@@ -1357,7 +1369,11 @@ Feature: Manage blocks in post content
13571369
@require-wp-5.0
13581370
Scenario: Render nested blocks
13591371
Given a WP install
1360-
When I run `wp post create --post_title='Nested' --post_content='<!-- wp:group {"className":"test-group"} --><!-- wp:paragraph --><p>Inner</p><!-- /wp:paragraph --><!-- /wp:group -->' --porcelain`
1372+
And a block-content.txt file:
1373+
"""
1374+
<!-- wp:group {"className":"test-group"} --><!-- wp:paragraph --><p>Inner</p><!-- /wp:paragraph --><!-- /wp:group -->
1375+
"""
1376+
When I run `wp post create block-content.txt --post_title='Nested' --porcelain`
13611377
Then save STDOUT as {POST_ID}
13621378

13631379
When I run `wp post block render {POST_ID}`
@@ -1503,7 +1519,11 @@ Feature: Manage blocks in post content
15031519
@require-wp-5.0
15041520
Scenario: Replace block preserves content
15051521
Given a WP install
1506-
When I run `wp post create --post_title='Test' --post_content='<!-- wp:paragraph --><p>Keep this text</p><!-- /wp:paragraph -->' --porcelain`
1522+
And a block-content.txt file:
1523+
"""
1524+
<!-- wp:paragraph --><p>Keep this text</p><!-- /wp:paragraph -->
1525+
"""
1526+
When I run `wp post create block-content.txt --post_title='Test' --porcelain`
15071527
Then save STDOUT as {POST_ID}
15081528

15091529
When I run `wp post block replace {POST_ID} core/paragraph core/verse`
@@ -1521,7 +1541,11 @@ Feature: Manage blocks in post content
15211541
@require-wp-5.0
15221542
Scenario: Get nested block shows inner blocks
15231543
Given a WP install
1524-
When I run `wp post create --post_title='Test' --post_content='<!-- wp:group --><!-- wp:paragraph --><p>Inner</p><!-- /wp:paragraph --><!-- /wp:group -->' --porcelain`
1544+
And a block-content.txt file:
1545+
"""
1546+
<!-- wp:group --><!-- wp:paragraph --><p>Inner</p><!-- /wp:paragraph --><!-- /wp:group -->
1547+
"""
1548+
When I run `wp post create block-content.txt --post_title='Test' --porcelain`
15251549
Then save STDOUT as {POST_ID}
15261550

15271551
When I run `wp post block get {POST_ID} 0`
@@ -1537,7 +1561,11 @@ Feature: Manage blocks in post content
15371561
@require-wp-5.0
15381562
Scenario: Update both attrs and content
15391563
Given a WP install
1540-
When I run `wp post create --post_title='Test' --post_content='<!-- wp:heading {"level":2} --><h2>Old Title</h2><!-- /wp:heading -->' --porcelain`
1564+
And a block-content.txt file:
1565+
"""
1566+
<!-- wp:heading {"level":2} --><h2>Old Title</h2><!-- /wp:heading -->
1567+
"""
1568+
When I run `wp post create block-content.txt --post_title='Test' --porcelain`
15411569
Then save STDOUT as {POST_ID}
15421570

15431571
When I run `wp post block update {POST_ID} 0 --attrs='{"level":3}' --content="<h3>New Title</h3>"`

features/post-meta.feature

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
Feature: Manage post custom fields
22

3+
# Windos likes to include the quotes of the `"via STDIN"` string.
4+
@skip-windows
35
Scenario: Postmeta CRUD
46
Given a WP install
57

features/post.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ Feature: Manage WordPress posts
224224
"""
225225
And a create-post.sh file:
226226
"""
227-
cat content.html | wp post create --post_title='Test post' --post_excerpt="A multiline
227+
cat content.html | wp post create --post_title="Test post" --post_excerpt="A multiline
228228
excerpt" --porcelain -
229229
"""
230230

@@ -272,7 +272,7 @@ Feature: Manage WordPress posts
272272
"""
273273
And the return code should be 0
274274

275-
When I run `EDITOR='ex -i NONE -c %s/content/bunkum -c wq' wp post edit {POST_ID}`
275+
When I run `EDITOR="ex -i NONE -c %s/content/bunkum -c wq" wp post edit {POST_ID}`
276276
Then STDERR should be empty
277277
And STDOUT should contain:
278278
"""

0 commit comments

Comments
 (0)