From 224c4dc57ee42215806c6fb8b92e64ddebaa7fd7 Mon Sep 17 00:00:00 2001 From: Tad Fisher Date: Sun, 19 Mar 2017 23:48:03 -0700 Subject: Use expect for interactive tests --- test/insert.t | 45 ++++++++++++++++++++++++++++++++++++++------- test/setup.sh | 6 ++---- 2 files changed, 40 insertions(+), 11 deletions(-) (limited to 'test') diff --git a/test/insert.t b/test/insert.t index 0c19d11..b4af4f5 100755 --- a/test/insert.t +++ b/test/insert.t @@ -16,9 +16,18 @@ test_expect_success 'Prompts before overwriting key URI' ' uri1="otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Foo" uri2="otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Bar" - test_pass_init && - "$PASS" otp insert "$uri1" passfile && - test_faketty "$PASS" otp insert "$uri2" passfile < <(echo n) && + test_pass_init + "$PASS" otp insert "$uri1" passfile + expect <