password-store

Simple password manager using gpg and ordinary unix directories
git clone https://git.zx2c4.com/password-store
Log | Files | Refs | README | LICENSE

t0200-edit-tests.sh (413B)


      1 #!/usr/bin/env bash
      2 
      3 test_description='Test edit'
      4 cd "$(dirname "$0")"
      5 . ./setup.sh
      6 
      7 test_expect_success 'Test "edit" command' '
      8 	"$PASS" init $KEY1 &&
      9 	"$PASS" generate cred1 90 &&
     10 	export FAKE_EDITOR_PASSWORD="big fat fake password" &&
     11 	export PATH="$TEST_HOME:$PATH"
     12 	export EDITOR="fake-editor-change-password.sh" &&
     13 	"$PASS" edit cred1 &&
     14 	[[ $("$PASS" show cred1) == "$FAKE_EDITOR_PASSWORD" ]]
     15 '
     16 
     17 test_done