-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
86 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1066,3 +1066,27 @@ Feature: Search through the database | |
:aöXYXYX | ||
""" | ||
And STDERR should be empty | ||
|
||
Scenario: Search for a string and output the format as a table | ||
Given a WP install | ||
|
||
When I run `wp db search example.com --format=csv` | ||
Then STDOUT should contain: | ||
""" | ||
wp_options,option_value,option_id,14,mail.example.com | ||
wp_options,option_value,option_id,15,[email protected] | ||
""" | ||
|
||
When I run `wp db search example.com --format=ids` | ||
Then STDERR should be: | ||
""" | ||
Error: The "ids" format can only be used for a single table. | ||
""" | ||
And STDOUT should be empty | ||
And the return code should be 1 | ||
|
||
When I run `wp db search example.com wp_options --format=ids` | ||
Then STDOUT should contain: | ||
""" | ||
14 15 | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters