summaryrefslogtreecommitdiff
path: root/test/add
blob: f319813f396c10e63aabdc90aa9204ede8726e1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
## vim:ft=zsh
echo "# pkg add (ok)"
pkg add $repo
[[ -e $test_pdir/$repo/foo ]]
[[ -d $test_pdir/$repo/.git ]]

echo "# pkg add (already installed)"
! pkg add $repo

echo "# populate_collected"
[[ -L $test_home/bin/$file ]]
[[ -x $(readlink $test_home/bin/$file) ]]
[[ -e $test_pdir/.collected/man/man2/$file.2 ]]

repeat 2 {
	echo "# pkg list"
	stringcmp "pkg\n$repo" "$(pkg list local)"
	stringcmp "$complement\nrb\nrb-bare\nrc\nrc-bare" "$(pkg list not-installed)"
	stringcmp "pkg\nra\nra-bare\nrb\nrb-bare\nrc\nrc-bare" "$(pkg list remote)"
	pkg update
}