Skip to content

Commit 6ad7621

Browse files
committed
Add some return code checks to tries.
1 parent 92dc41c commit 6ad7621

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

features/search-replace.feature

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ Feature: Do global search/replace
110110
"""
111111
Error: Couldn't find any tables matching: wp_opt*on
112112
"""
113+
And the return code should be 1
113114

114115
When I run `wp search-replace foo burrito wp_opt\* wp_postme\*`
115116
Then STDOUT should be a table containing rows:
@@ -256,6 +257,7 @@ Feature: Do global search/replace
256257
Warning: Replacement value 'foo' is identical to search value 'foo'. Skipping operation.
257258
"""
258259
And STDOUT should be empty
260+
And the return code should be 0
259261

260262
Scenario: Search and replace a table that has a multi-column primary key
261263
Given a WP install
@@ -588,6 +590,7 @@ Feature: Do global search/replace
588590
"""
589591
Warning: No such table 'no_such_table'.
590592
"""
593+
And the return code should be 0
591594

592595
When I run `wp db query "CREATE TABLE no_key ( awesome_stuff TEXT );"`
593596
And I run `wp search-replace foo bar no_key`
@@ -613,6 +616,7 @@ Feature: Do global search/replace
613616
"""
614617
Warning: No primary keys for table 'no_key'.
615618
"""
619+
And the return code should be 0
616620

617621
Scenario: Search / replace is case sensitive
618622
Given a WP install

0 commit comments

Comments
 (0)