pashage

Yet Another Opinionated Re-engineering of the Unix Password Store
git clone https://git.instinctive.eu/pashage.git
Log | Files | Refs | README | LICENSE

commit 19e55d90b75b3c0447086518d93907e192951b0b
parent 4263b633197f4e32f9457b6026d7348627243599
Author: Natasha Kerensikova <natgh@instinctive.eu>
Date:   Sun, 27 Oct 2024 14:15:18 +0000

Find command is fully covered by integrated suites
Diffstat:
Mspec/pashage_extra_spec.sh | 34+++++++++++++++++++++++++++++++++-
1 file changed, 33 insertions(+), 1 deletion(-)

diff --git a/spec/pashage_extra_spec.sh b/spec/pashage_extra_spec.sh @@ -295,7 +295,39 @@ Describe 'Integrated Command Functions' End End -# Describe 'cmd_find' + Describe 'cmd_find' + grep() { @grep "$@"; } + + It 'interprets the pattern as a regular expression' + expected_output() { %text + #|Search pattern: ^o + #|`- (B)fluff(N) + #| `- one + } + When call cmd_find '^o' + The status should be success + The output should equal "$(expected_output)" + The error should be blank + The result of function check_git_log should be successful + End + + It 'forwards flags to grep' + expected_output() { %text + #|Search pattern: -E -i F|I + #||- (B)extra(N) + #|| `- (B)subdir(N) + #|| `- file + #|`- (B)subdir(N) + #| `- file + } + When call cmd_find -E -i 'F|I' + The status should be success + The output should equal "$(expected_output)" + The error should be blank + The result of function check_git_log should be successful + End + End + # Describe 'cmd_generate' # Describe 'cmd_git' # Describe 'cmd_grep'