From 176dc7524612fc35d01517eae8c9eb22eb7b5820 Mon Sep 17 00:00:00 2001 From: Nilambar Sharma Date: Tue, 13 Aug 2024 11:54:00 +0545 Subject: [PATCH] Add feature test for correct error message --- features/db-search.feature | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/features/db-search.feature b/features/db-search.feature index 8734dc13..01b28861 100644 --- a/features/db-search.feature +++ b/features/db-search.feature @@ -1102,5 +1102,13 @@ Feature: Search through the database And STDOUT should be empty And the return code should be 1 + When I try `wp db search example.com --format=count` + Then STDERR should be: + """ + Error: The "count" 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 mail.example.com wp_options --format=ids` Then STDOUT should not be empty