Skip to content

Commit 83e2c42

Browse files
committed
Fix some quotes
1 parent 809d386 commit 83e2c42

3 files changed

Lines changed: 68 additions & 16 deletions

File tree

features/post-block.feature

Lines changed: 65 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,7 +1037,11 @@ Feature: Manage blocks in post content
10371037
@require-wp-5.0
10381038
Scenario: Extract attribute values
10391039
Given a WP install
1040-
When I run `wp post create --post_title='Block Post' --post_content='<!-- wp:heading {"level":2} --><h2>Title 1</h2><!-- /wp:heading --><!-- wp:heading {"level":3} --><h3>Title 2</h3><!-- /wp:heading -->' --porcelain`
1040+
And a block-content.txt file:
1041+
"""
1042+
<!-- wp:heading {"level":2} --><h2>Title 1</h2><!-- /wp:heading --><!-- wp:heading {"level":3} --><h3>Title 2</h3><!-- /wp:heading -->
1043+
"""
1044+
When I run `wp post create block-content.txt --post_title='Block Post' --porcelain`
10411045
Then save STDOUT as {POST_ID}
10421046

10431047
When I run `wp post block extract {POST_ID} --block=core/heading --attr=level --format=ids`
@@ -1053,7 +1057,11 @@ Feature: Manage blocks in post content
10531057
@require-wp-5.0
10541058
Scenario: Extract attribute from specific index
10551059
Given a WP install
1056-
When I run `wp post create --post_title='Block Post' --post_content='<!-- wp:heading {"level":2} --><h2>Title</h2><!-- /wp:heading -->' --porcelain`
1060+
And a block-content.txt file:
1061+
"""
1062+
<!-- wp:heading {"level":2} --><h2>Title</h2><!-- /wp:heading -->
1063+
"""
1064+
When I run `wp post create block-content.txt --post_title='Block Post' --porcelain`
10571065
Then save STDOUT as {POST_ID}
10581066

10591067
When I run `wp post block extract {POST_ID} --index=0 --attr=level --format=ids`
@@ -1065,7 +1073,11 @@ Feature: Manage blocks in post content
10651073
@require-wp-5.0
10661074
Scenario: Extract content from blocks
10671075
Given a WP install
1068-
When I run `wp post create --post_title='Block Post' --post_content='<!-- wp:paragraph --><p>Hello World</p><!-- /wp:paragraph -->' --porcelain`
1076+
And a block-content.txt file:
1077+
"""
1078+
<!-- wp:paragraph --><p>Hello World</p><!-- /wp:paragraph -->
1079+
"""
1080+
When I run `wp post create block-content.txt --post_title='Block Post' --porcelain`
10691081
Then save STDOUT as {POST_ID}
10701082

10711083
When I run `wp post block extract {POST_ID} --block=core/paragraph --content --format=ids`
@@ -1077,7 +1089,11 @@ Feature: Manage blocks in post content
10771089
@require-wp-5.0
10781090
Scenario: Extract error when no attr or content specified
10791091
Given a WP install
1080-
When I run `wp post create --post_title='Block Post' --post_content='<!-- wp:paragraph --><p>Test</p><!-- /wp:paragraph -->' --porcelain`
1092+
And a block-content.txt file:
1093+
"""
1094+
<!-- wp:paragraph --><p>Test</p><!-- /wp:paragraph -->
1095+
"""
1096+
When I run `wp post create block-content.txt --post_title='Block Post' --porcelain`
10811097
Then save STDOUT as {POST_ID}
10821098

10831099
When I try `wp post block extract {POST_ID}`
@@ -1094,7 +1110,11 @@ Feature: Manage blocks in post content
10941110
@require-wp-5.0
10951111
Scenario: Check for nested block inside group
10961112
Given a WP install
1097-
When I run `wp post create --post_title='Nested' --post_content='<!-- wp:group --><!-- wp:paragraph --><p>Nested para</p><!-- /wp:paragraph --><!-- /wp:group -->' --porcelain`
1113+
And a block-content.txt file:
1114+
"""
1115+
<!-- wp:group --><!-- wp:paragraph --><p>Nested para</p><!-- /wp:paragraph --><!-- /wp:group -->
1116+
"""
1117+
When I run `wp post create block-content.txt --post_title='Nested' --porcelain`
10981118
Then save STDOUT as {POST_ID}
10991119

11001120
# Should find the nested paragraph
@@ -1114,7 +1134,11 @@ Feature: Manage blocks in post content
11141134
@require-wp-5.0
11151135
Scenario: Partial block name does not match
11161136
Given a WP install
1117-
When I run `wp post create --post_title='Test' --post_content='<!-- wp:paragraph --><p>Test</p><!-- /wp:paragraph -->' --porcelain`
1137+
And a block-content.txt file:
1138+
"""
1139+
<!-- wp:paragraph --><p>Test</p><!-- /wp:paragraph -->
1140+
"""
1141+
When I run `wp post create block-content.txt --post_title='Test' --porcelain`
11181142
Then save STDOUT as {POST_ID}
11191143

11201144
# "core/para" should NOT match "core/paragraph"
@@ -1226,10 +1250,18 @@ Feature: Manage blocks in post content
12261250
@require-wp-5.0
12271251
Scenario: Count blocks filtered by post type
12281252
Given a WP install
1229-
When I run `wp post create --post_title="Post" --post_type=post --post_content="<!-- wp:paragraph --><p>Post</p><!-- /wp:paragraph -->" --post_status=publish --porcelain`
1253+
And a block-content-1.txt file:
1254+
"""
1255+
<!-- wp:paragraph --><p>Post</p><!-- /wp:paragraph -->
1256+
"""
1257+
When I run `wp post create block-content-1.txt --post_title='Post' --post_type=post --post_status=publish --porcelain`
12301258
Then save STDOUT as {POST_ID}
12311259

1232-
When I run `wp post create --post_title='Page' --post_type=page --post_content='<!-- wp:heading --><h2>Page</h2><!-- /wp:heading -->' --post_status=publish --porcelain`
1260+
And a block-content-2.txt file:
1261+
"""
1262+
<!-- wp:heading --><h2>Page</h2><!-- /wp:heading -->
1263+
"""
1264+
When I run `wp post create block-content-2.txt --post_title='Page' --post_type=page --post_status=publish --porcelain`
12331265
Then save STDOUT as {PAGE_ID}
12341266

12351267
When I run `wp post block count {POST_ID} --post-type=post`
@@ -1245,7 +1277,11 @@ Feature: Manage blocks in post content
12451277
@require-wp-5.0
12461278
Scenario: Count blocks filtered by post status
12471279
Given a WP install
1248-
When I run `wp post create --post_title='Published' --post_content='<!-- wp:paragraph --><p>Pub</p><!-- /wp:paragraph -->' --post_status=publish --porcelain`
1280+
And a block-content.txt file:
1281+
"""
1282+
<!-- wp:paragraph --><p>Pub</p><!-- /wp:paragraph -->
1283+
"""
1284+
When I run `wp post create block-content.txt --post_title='Published' --post_status=publish --porcelain`
12491285
Then save STDOUT as {PUB_ID}
12501286

12511287
When I run `wp post create --post_title="Draft" --post_content="<!-- wp:heading --><h2>Draft</h2><!-- /wp:heading -->" --post_status=draft --porcelain`
@@ -1601,7 +1637,11 @@ Feature: Manage blocks in post content
16011637
@require-wp-5.0
16021638
Scenario: Clone nested block preserves children
16031639
Given a WP install
1604-
When I run `wp post create --post_title='Test' --post_content='<!-- wp:group --><!-- wp:paragraph --><p>Inner</p><!-- /wp:paragraph --><!-- /wp:group -->' --porcelain`
1640+
And a block-content.txt file:
1641+
"""
1642+
<!-- wp:group --><!-- wp:paragraph --><p>Inner</p><!-- /wp:paragraph --><!-- /wp:group -->
1643+
"""
1644+
When I run `wp post create block-content.txt --post_title='Test' --porcelain`
16051645
Then save STDOUT as {POST_ID}
16061646

16071647
When I run `wp post block clone {POST_ID} 0`
@@ -1681,7 +1721,11 @@ Feature: Manage blocks in post content
16811721
@require-wp-5.0
16821722
Scenario: List with --nested counts all nesting levels
16831723
Given a WP install
1684-
When I run `wp post create --post_title='Deep' --post_content='<!-- wp:group --><!-- wp:group --><!-- wp:paragraph --><p>Deep</p><!-- /wp:paragraph --><!-- /wp:group --><!-- /wp:group -->' --porcelain`
1724+
And a block-content.txt file:
1725+
"""
1726+
<!-- wp:group --><!-- wp:group --><!-- wp:paragraph --><p>Deep</p><!-- /wp:paragraph --><!-- /wp:group --><!-- /wp:group -->
1727+
"""
1728+
When I run `wp post create block-content.txt --post_title='Deep' --porcelain`
16851729
Then save STDOUT as {POST_ID}
16861730

16871731
When I run `wp post block list {POST_ID} --nested`
@@ -1785,7 +1829,11 @@ Feature: Manage blocks in post content
17851829
@require-wp-5.0
17861830
Scenario: Extract attribute in various formats
17871831
Given a WP install
1788-
When I run `wp post create --post_title='Test' --post_content='<!-- wp:heading {"level":2} --><h2>One</h2><!-- /wp:heading --><!-- wp:heading {"level":3} --><h3>Two</h3><!-- /wp:heading -->' --porcelain`
1832+
And a block-content.txt file:
1833+
"""
1834+
<!-- wp:heading {"level":2} --><h2>One</h2><!-- /wp:heading --><!-- wp:heading {"level":3} --><h3>Two</h3><!-- /wp:heading -->
1835+
"""
1836+
When I run `wp post create block-content.txt --post_title='Test' --porcelain`
17891837
Then save STDOUT as {POST_ID}
17901838

17911839
When I run `wp post block extract {POST_ID} --block=core/heading --attr=level --format=json`
@@ -1803,7 +1851,11 @@ Feature: Manage blocks in post content
18031851
@require-wp-5.0
18041852
Scenario: Extract with both block and index filters
18051853
Given a WP install
1806-
When I run `wp post create --post_title='Test' --post_content='<!-- wp:paragraph --><p>Para</p><!-- /wp:paragraph --><!-- wp:heading {"level":2} --><h2>Title</h2><!-- /wp:heading -->' --porcelain`
1854+
And a block-content.txt file:
1855+
"""
1856+
<!-- wp:paragraph --><p>Para</p><!-- /wp:paragraph --><!-- wp:heading {"level":2} --><h2>Title</h2><!-- /wp:heading -->
1857+
"""
1858+
When I run `wp post create block-content.txt --post_title='Test' --porcelain`
18071859
Then save STDOUT as {POST_ID}
18081860

18091861
# --index=1 is the heading, --block filter should match

features/post-meta.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Feature: Manage post custom fields
3434
["1","2"]
3535
"""
3636

37-
When I run `echo 'via STDIN' | wp post-meta set 1 foo`
37+
When I run `echo "via STDIN" | wp post-meta set 1 foo`
3838
And I run `wp post-meta get 1 foo`
3939
Then STDOUT should be:
4040
"""

features/post.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ Feature: Manage WordPress posts
265265
}
266266
"""
267267

268-
When I try `EDITOR='ex -i NONE -c q!' wp post edit {POST_ID}`
268+
When I try `EDITOR="ex -i NONE -c q!" wp post edit {POST_ID}`
269269
Then STDERR should contain:
270270
"""
271271
No change made to post content.
@@ -473,7 +473,7 @@ Feature: Manage WordPress posts
473473
My\Post
474474
"""
475475

476-
When I run `wp post update {POST_ID} --post_content='var isEmailValid = /^\S+@\S+.\S+$/.test(email);'`
476+
When I run `wp post update {POST_ID} --post_content="var isEmailValid = /^\S+@\S+.\S+$/.test(email);"`
477477
Then STDOUT should not be empty
478478

479479
When I run `wp post get {POST_ID} --field=content`

0 commit comments

Comments
 (0)