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 6901013b90775d3148be339ef32390f07180e67f
parent ede28a13a0bc092d5ff4de20f69e1eac68394334
Author: Jason A. Donenfeld <Jason@zx2c4.com>
Date:   Wed, 23 Apr 2014 05:11:08 +0200

tests: better group resolution

Diffstat:
Mtests/setup.sh | 9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/tests/setup.sh b/tests/setup.sh @@ -192,9 +192,14 @@ gpg_keys_from_encrypted_file() { # Finds keys used in gpg.conf group # # Arguments: <group> -# Returns: 0, and echos keys on new lines, which might be non-canonical +# Returns: 0, and echos keys on new lines gpg_keys_from_group() { - $GPG --list-config --with-colons | sed -n "s/^cfg:group:$1:\\(.*\\)/\\1/p" | tr ';' '\n' + local output="$($GPG --list-config --with-colons | sed -n "s/^cfg:group:$1:\\(.*\\)/\\1/p" | head -n 1)" + local saved_ifs="$IFS" + IFS=";" + local keys=( $output ) + IFS="$saved_ifs" + canonicalize_gpg_keys "${keys[@]}" } # Initialize the test harness