m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/setup.sh2
-rwxr-xr-xtests/t0020-show-tests.sh5
2 files changed, 6 insertions, 1 deletions
diff --git a/tests/setup.sh b/tests/setup.sh
index 5d1e794..20dd7ea 100644
--- a/tests/setup.sh
+++ b/tests/setup.sh
@@ -52,7 +52,7 @@ fi
export GNUPGHOME="$TEST_HOME/gnupg/"
chmod 700 "$GNUPGHOME"
GPG="gpg"
-which gpg2 &>/dev/null && GPG="gpg2"
+command -v gpg2 &>/dev/null && GPG="gpg2"
# We don't want any currently running agent to conflict.
unset GPG_AGENT_INFO
diff --git a/tests/t0020-show-tests.sh b/tests/t0020-show-tests.sh
index a4b782f..81b87b4 100755
--- a/tests/t0020-show-tests.sh
+++ b/tests/t0020-show-tests.sh
@@ -15,6 +15,11 @@ test_expect_success 'Test "show" command with spaces' '
[[ $("$PASS" show "I am a cred with lots of spaces") == "BLAH!!" ]]
'
+test_expect_success 'Test "show" command with unicode' '
+ "$PASS" generate 🏠 &&
+ "$PASS" show | grep -q '🏠'
+'
+
test_expect_success 'Test "show" of nonexistant password' '
test_must_fail "$PASS" show cred2
'