aboutsummaryrefslogtreecommitdiff
path: root/test/append.t
diff options
context:
space:
mode:
authorTad Fisher <tadfisher@gmail.com>2018-03-04 11:26:13 -0800
committerGitHub <noreply@github.com>2018-03-04 11:26:13 -0800
commitf88e6a338cd976bfa4e14567c1f3024ddc58ab7d (patch)
tree4549da42122c877121c38b2956abf5fbd479c554 /test/append.t
parent0737f1f3e8ad8e31b7b5d7eb9b6a6a21eb3781e9 (diff)
parent948c2f04cbaf2f065b0c21b80de82f1f0c946e54 (diff)
Merge pull request #56 from tadfisher/develop
Merge branch 'develop' into master
Diffstat (limited to 'test/append.t')
-rwxr-xr-xtest/append.t11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/append.t b/test/append.t
index bba3c60..7f6d0af 100755
--- a/test/append.t
+++ b/test/append.t
@@ -14,6 +14,17 @@ test_expect_success 'Reads non-terminal input' '
[[ $("$PASS" otp uri passfile) == "$uri" ]]
'
+test_expect_success 'Read secret non-terminal input' '
+ existing="foo bar baz"
+ secret=JBSWY3DPEHPK3PXP
+ uri="otpauth://totp/Example:alice%40google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example"
+
+ test_pass_init &&
+ "$PASS" insert -e passfile <<< "$existing" &&
+ "$PASS" otp append -s -i Example -a alice@google.com -e passfile <<< "$secret" &&
+ [[ $("$PASS" otp uri passfile) == "$uri" ]]
+'
+
test_expect_success 'Reads terminal input in noecho mode' '
existing="foo bar baz"
uri="otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example"