password-store

Simple password manager using gpg and ordinary unix directories
git clone https://git.zx2c4.com/password-store
Log | Files | Refs | README | LICENSE

commit 094c5b3ca856d57c0dd0c7803a0dbbfe9c9a9a61
parent e14a170d577783ba7365555cb464488c72f279ce
Author: Jason A. Donenfeld <Jason@zx2c4.com>
Date:   Wed, 23 Apr 2014 19:03:01 +0200

tests: add grep test

Diffstat:
Atests/t0400-grep.sh | 20++++++++++++++++++++
1 file changed, 20 insertions(+), 0 deletions(-)

diff --git a/tests/t0400-grep.sh b/tests/t0400-grep.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +test_description='Grep check' +. ./setup.sh + +test_expect_success 'Make sure grep prints normal lines' ' + pass init $KEY1 && + pass insert -e blah1 <<<"hello" && + pass insert -e blah2 <<<"my name is" && + pass insert -e folder/blah3 <<<"I hate computers" && + pass insert -e blah4 <<<"me too!" && + pass insert -e folder/where/blah5 <<<"They are hell" && + results="$(pass grep hell)" && + [[ $(wc -l <<<"$results") -eq 4 ]] && + grep -q blah5 <<<"$results" && + grep -q blah1 <<<"$results" && + grep -q "They are" <<<"$results" +' + +test_done