#!/usr/bin/env bash export test_description="Tests pass otp insert commands" . ./setup.sh test_expect_success 'Reads non-terminal input' ' uri="otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example" test_pass_init && "$PASS" otp insert passfile <<< "$uri" && [[ $("$PASS" show passfile) == "$uri" ]] ' test_expect_success 'Reads terminal input in noecho mode' ' uri="otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example" test_pass_init expect <