aboutsummaryrefslogtreecommitdiff
path: root/test/validate.t
diff options
context:
space:
mode:
Diffstat (limited to 'test/validate.t')
-rwxr-xr-xtest/validate.t4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/validate.t b/test/validate.t
index 9fbe66c..6d05fdf 100755
--- a/test/validate.t
+++ b/test/validate.t
@@ -12,6 +12,10 @@ test_expect_success 'Parses a complex TOTP URI' '
"$PASS" otp validate otpauth://totp/ACME%20Co:john.doe@email.com?secret=HXDMVJECJJWSRB3HWIZR4IFUGFTMXBOZ&issuer=ACME%20Co&algorithm=SHA1&digits=6&period=30
'
+test_expect_success 'Parses a basic HOTP URI' '
+ "$PASS" otp validate "otpauth://hotp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&counter=10&issuer=Example"
+'
+
test_expect_success 'Fails for bogus URL' '
test_must_fail "$PASS" otp validate https://www.google.com/
'