summaryrefslogtreecommitdiff
path: root/tests/t0060-rm-tests.sh
blob: 58f55f3f64213632cc920ceabd859d469565aed8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env bash

test_description='Test rm'
cd "$(dirname "$0")"
. ./setup.sh

test_expect_success 'Test "rm" command' '
	"$PASS" init $KEY1 &&
	"$PASS" generate cred1 43 &&
	"$PASS" rm cred1 &&
	[[ ! -e $PASSWORD_STORE_DIR/cred1.gpg ]]
'

test_expect_success 'Test "rm" command with spaces' '
	"$PASS" generate "hello i have spaces" 43 &&
	[[ -e $PASSWORD_STORE_DIR/"hello i have spaces".gpg ]] &&
	"$PASS" rm "hello i have spaces" &&
	[[ ! -e $PASSWORD_STORE_DIR/"hello i have spaces".gpg ]]
'

test_expect_success 'Test "rm" of non-existent password' '
	test_must_fail "$PASS" rm does-not-exist
'

test_done
d6768a67093166810621d2521f10fd016bd75721&follow=1'>cgit.mk: don't rebuild everything if CGIT_VERSION changesJohn Keeping1-1/+8 2013-03-20ui-patch: use cgit_version not CGIT_VERSIONJohn Keeping1-1/+1 2013-03-20Makefile: re-use Git's Makefile where possibleJohn Keeping3-119/+80