From 8f2e0fb1e5972e1fe1b267f5939c60097d28b3f3 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 22 Apr 2009 10:44:15 +0200 Subject: Added tests for pkg push --- test/add | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/add (limited to 'test/add') diff --git a/test/add b/test/add new file mode 100644 index 0000000..9810ca4 --- /dev/null +++ b/test/add @@ -0,0 +1,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 "core\n$repo" "$(pkg list local)" + stringcmp "$complement\nrb\nrb-bare\nrc\nrc-bare" "$(pkg list not-installed)" + stringcmp "core\nra\nra-bare\nrb\nrb-bare\nrc\nrc-bare" "$(pkg list remote)" + pkg update +} -- cgit v1.2.3