diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-04-10 22:41:28 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-04-10 22:41:28 +0200 |
commit | 9ae5f36e46584f1f24c2e8fdf30d2754f92caf3e (patch) | |
tree | 1e5804071d1639fff5e498d7111440891a70419a /test/main | |
parent | 34badfbe0285e92d4f1fcedca2455e6fc1f3eb3e (diff) |
Added tests for pkg add, extended tests for pkg list
Diffstat (limited to 'test/main')
-rwxr-xr-x | test/main | 26 |
1 files changed, 24 insertions, 2 deletions
@@ -40,8 +40,8 @@ echo "# checking for success" [[ -d $test_pdir/core ]] echo "# pkg list local" -stringcmp "core" $(pkg list) -stringcmp "core" $(pkg list local) +stringcmp "core" "$(pkg list)" +stringcmp "core" "$(pkg list local)" echo "# pkg list not-installed" stringcmp "ra\nrb\nrc" "$(pkg list not-installed)" @@ -49,6 +49,28 @@ stringcmp "ra\nrb\nrc" "$(pkg list not-installed)" echo "# pkg list all" stringcmp "core\nra\nrb\nrc" "$(pkg list all)" +echo "# pkg add (no such repo)" +! pkg add weltfrieden + +echo "# pkg add (already installed)" +! pkg add core + +echo "# pkg add (ok)" +pkg add ra +[[ -e $test_pdir/ra/foo ]] +[[ -d $test_pdir/ra/.git ]] + +echo "# pkg add (already installed)" +! pkg add ra + +repeat 2 { + echo "# pkg list" + stringcmp "core\nra" "$(pkg list local)" + stringcmp "rb\nrc" "$(pkg list not-installed)" + stringcmp "core\nra\nrb\nrc" "$(pkg list remote)" + pkg update +} + rm -rf $test_pdir $test_proot $test_home print -P '%F{green} test passed%F{default}' |