password-store

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

t0500-find.sh (582B)


      1 #!/usr/bin/env bash
      2 
      3 test_description='Find check'
      4 cd "$(dirname "$0")"
      5 . ./setup.sh
      6 
      7 test_expect_success 'Make sure find resolves correct files' '
      8 	"$PASS" init $KEY1 &&
      9 	"$PASS" generate Something/neat 19 &&
     10 	"$PASS" generate Anotherthing/okay 38 &&
     11 	"$PASS" generate Fish 12 &&
     12 	"$PASS" generate Fishthings 122 &&
     13 	"$PASS" generate Fishies/stuff 21 &&
     14 	"$PASS" generate Fishies/otherstuff 1234 &&
     15 	[[ $("$PASS" find fish | sed "s/^[ \`|-]*//g;s/$(printf \\x1b)\\[[0-9;]*[a-zA-Z]//g" | tr "\\n" -) == "Search Terms: fish-Fish-Fishies-otherstuff-stuff-Fishthings-" ]]
     16 '
     17 
     18 test_done