@@ -244,19 +244,21 @@ Feature: Search through the database
244
244
When I run `wp db query "CREATE TABLE no_key ( awesome_stuff TEXT );" `
245
245
And I run `wp db query "CREATE TABLE no_text ( id int(11) unsigned NOT NULL AUTO_INCREMENT, PRIMARY KEY (id) );" `
246
246
247
- When I run `wp db search example.com no_key`
247
+ When I try `wp db search example.com no_key`
248
248
Then STDOUT should be empty
249
249
And STDERR should be:
250
250
"""
251
251
Warning: No primary key for table 'no_key'. No row ids will be outputted.
252
252
"""
253
+ And the return code should be 0
253
254
254
- When I run `wp db search example.com no_text`
255
+ When I try `wp db search example.com no_text`
255
256
Then STDOUT should be empty
256
257
And STDERR should be:
257
258
"""
258
259
Warning: No text columns for table 'no_text' - skipped.
259
260
"""
261
+ And the return code should be 0
260
262
261
263
Scenario : Search on a multisite install
262
264
Given a WP multisite install
@@ -937,11 +939,20 @@ Feature: Search through the database
937
939
[33;1m1[0m:example.com
938
940
"""
939
941
940
- When I run `wp db search example.com --match_color=%x`
942
+ When I try `wp db search example.com --match_color=%x`
941
943
Then STDERR should be:
942
944
"""
943
945
Warning: Unrecognized percent color code '%x' for 'match_color'.
944
946
"""
947
+ And STDOUT should contain:
948
+ """
949
+ example.com
950
+ """
951
+ And STDOUT should not contain:
952
+ """
953
+
954
+ """
955
+ And the return code should be 0
945
956
946
957
Scenario : Search should cater for field/table names that use reserved words or unusual characters
947
958
Given a WP install
0 commit comments