From 4ad9f5821324cc44f9dfc574abb4308cc4a8a9ef Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Tue, 21 Feb 2023 09:51:13 -0800 Subject: [PATCH] Add tests for found count with -n equivalent argument --- tests/bdd/features/search.feature | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tests/bdd/features/search.feature b/tests/bdd/features/search.feature index d653a621..4049f90e 100644 --- a/tests/bdd/features/search.feature +++ b/tests/bdd/features/search.feature @@ -328,3 +328,29 @@ Feature: Searching in a journal 2013-06-17 20:38 This entry has a location. 2013-07-17 11:38 This entry is starred! + + Scenario Outline: Searching the most recent entry should not show found count + Given we use the config "" + And we use the password "test" if prompted + When we run "jrnl -1" + Then the error output should not contain "1 entry found" + + Examples: configs + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | + + Scenario Outline: Searching for more entries than are in the journal should show found count + Given we use the config "" + And we use the password "test" if prompted + When we run "jrnl -4" + Then the error output should contain "3 entries found" + + Examples: configs + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + | basic_dayone.yaml |