From e483ca59a6ed91f584b4e889a8b4ab79cc199183 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 12 Apr 2009 12:29:01 +0200 Subject: Added basic test for {populate,genocide}_collected --- test/main | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'test/main') diff --git a/test/main b/test/main index 6f7766c..62bc7b6 100755 --- a/test/main +++ b/test/main @@ -25,7 +25,10 @@ for repo in ra rb rc; ( cd $repo git init touch foo - git add foo + mkdir bin + touch bin/$repo + chmod 755 bin/$repo + git add . git commit -m 'initial commit' ) @@ -38,6 +41,8 @@ echo "# checking for success" [[ -e $test_home/.pkg.conf ]] [[ -d $test_proot/core ]] [[ -d $test_pdir/core ]] +[[ -L $test_home/bin/pkg ]] +[[ -L $test_home/bin/checklinks ]] echo "# pkg list local" stringcmp "core" "$(pkg list)" @@ -63,6 +68,9 @@ pkg add ra echo "# pkg add (already installed)" ! pkg add ra +echo "# populate_collected (~/bin)" +[[ -L $test_home/bin/ra ]] + repeat 2 { echo "# pkg list" stringcmp "core\nra" "$(pkg list local)" @@ -78,6 +86,9 @@ echo "# pkg remove (not installed/nonexistent)" echo "# pkg remove (ok)" pkg remove ra +echo "# genocide_collected (~/bin)" +[[ ! -L $test_home/bin/ra ]] + repeat 2 { echo "# pkg list" stringcmp "core" "$(pkg list local)" -- cgit v1.2.3