diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/add | 18 | ||||
-rwxr-xr-x | test/main | 44 | ||||
-rw-r--r-- | test/pull | 4 | ||||
-rw-r--r-- | test/push | 2 | ||||
-rw-r--r-- | test/remove | 20 | ||||
-rw-r--r-- | test/setup | 4 |
6 files changed, 46 insertions, 46 deletions
@@ -1,11 +1,11 @@ ## vim:ft=zsh -echo "# pkg add (ok)" -pkg add $repo +echo "# ct add (ok)" +ct add $repo [[ -e $test_pdir/$repo/foo ]] [[ -d $test_pdir/$repo/.git ]] -echo "# pkg add (already installed)" -! pkg add $repo +echo "# ct add (already installed)" +! ct add $repo echo "# populate_collected" [[ -L $test_home/bin/$file ]] @@ -13,9 +13,9 @@ echo "# populate_collected" [[ -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 + echo "# ct list" + stringcmp "caretaker\n$repo" "$(ct list local)" + stringcmp "$complement\nrb\nrb-bare\nrc\nrc-bare" "$(ct list not-installed)" + stringcmp "caretaker\nra\nra-bare\nrb\nrb-bare\nrc\nrc-bare" "$(ct list remote)" + ct update } @@ -3,7 +3,7 @@ unset -m 'GIT_*' 'XDG_*' setopt err_exit trap "print -P '\n%N:%i: %B%F{red}Test faild!%F{default}%b'" ZERR -alias pkg='pkg --quiet --no-colours' +alias ct='ct --quiet --no-colours' source test/documentation @@ -31,39 +31,39 @@ source $tests/checklinks (source $tests/setup) echo "# bootstrapping PKG_DIR" -$test_proot/pkg/include/bootstrap $test_proot $test_pdir +$test_proot/caretaker/include/bootstrap $test_proot $test_pdir echo "# checking for success" -[[ -e $test_home/.config/pkg/pkg.conf ]] -[[ -d $test_proot/pkg ]] -[[ -d $test_pdir/pkg ]] -[[ -L $test_home/bin/pkg ]] +[[ -e $test_home/.config/caretaker/caretaker.conf ]] +[[ -d $test_proot/caretaker ]] +[[ -d $test_pdir/caretaker ]] +[[ -L $test_home/bin/ct ]] [[ -L $test_home/bin/checklinks ]] -[[ -x $(readlink $test_home/bin/pkg) ]] +[[ -x $(readlink $test_home/bin/ct) ]] [[ -x $(readlink $test_home/bin/checklinks) ]] -[[ -e $test_pdir/.collected/man/man1/pkg.1 ]] -[[ -e $test_pdir/.collected/man/man5/pkg.conf.5 ]] -[[ -e $test_pdir/.collected/man/man7/pkg.7 ]] +[[ -e $test_pdir/.collected/man/man1/ct.1 ]] +[[ -e $test_pdir/.collected/man/man5/caretaker.conf.5 ]] +[[ -e $test_pdir/.collected/man/man7/caretaker.7 ]] -echo "# pkg list local" -stringcmp "pkg" "$(pkg list)" -stringcmp "pkg" "$(pkg list local)" +echo "# ct list local" +stringcmp "caretaker" "$(ct list)" +stringcmp "caretaker" "$(ct list local)" -echo "# pkg list not-installed" -stringcmp "ra\nra-bare\nrb\nrb-bare\nrc\nrc-bare" "$(pkg list not-installed)" +echo "# ct list not-installed" +stringcmp "ra\nra-bare\nrb\nrb-bare\nrc\nrc-bare" "$(ct list not-installed)" -echo "# pkg list all" -stringcmp "pkg\nra\nra-bare\nrb\nrb-bare\nrc\nrc-bare" "$(pkg list all)" +echo "# ct list all" +stringcmp "caretaker\nra\nra-bare\nrb\nrb-bare\nrc\nrc-bare" "$(ct list all)" -echo "# pkg add (no such repo)" -! pkg add weltfrieden +echo "# ct add (no such repo)" +! ct add weltfrieden -echo "# pkg add (already installed)" -! pkg add pkg +echo "# ct add (already installed)" +! ct add caretaker for conf_origin in 0 1; { echo "## GIT_USE_ORIGIN=$conf_origin" - echo "GIT_USE_ORIGIN=$conf_origin" >> $test_home/.config/pkg/pkg.conf + echo "GIT_USE_ORIGIN=$conf_origin" >> $test_home/.config/caretaker/caretaker.conf for repo in ra ra-bare; { file=${repo%-*} if [[ $repo == *-bare ]] { @@ -1,6 +1,6 @@ ## vim:ft=zsh if [[ $repo == $file ]] { - echo "# pkg pull" - pkg pull + echo "# ct pull" + ct pull [[ -f $pkgdir/$repo/baz ]] } @@ -3,7 +3,7 @@ somefile=$RANDOM touch $somefile git add $somefile git commit --quiet -m $somefile -pkg push +ct push if [[ $repo == *-bare ]] { [[ $(git --git-dir=$test_proot/$repo log --pretty=oneline | head -1) == *$somefile ]] } else { diff --git a/test/remove b/test/remove index e850ec0..f895e60 100644 --- a/test/remove +++ b/test/remove @@ -1,19 +1,19 @@ ## vim:ft=zsh -echo "# pkg remove (not installed/nonexistent)" -! pkg remove suckage -! pkg remove rb +echo "# ct remove (not installed/nonexistent)" +! ct remove suckage +! ct remove rb -echo "# pkg remove (ok)" -pkg remove $repo +echo "# ct remove (ok)" +ct remove $repo echo "# genocide_collected (~/bin)" [[ ! -L $test_home/bin/$file ]] [[ ! -e $test_pdir/.collected/man/man2/$file.2 ]] repeat 2 { - echo "# pkg list" - stringcmp "pkg" "$(pkg list local)" - stringcmp "ra\nra-bare\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 + echo "# ct list" + stringcmp "caretaker" "$(ct list local)" + stringcmp "ra\nra-bare\nrb\nrb-bare\nrc\nrc-bare" "$(ct list not-installed)" + stringcmp "caretaker\nra\nra-bare\nrb\nrb-bare\nrc\nrc-bare" "$(ct list remote)" + ct update } @@ -1,8 +1,8 @@ ## vim:ft=zsh echo "# setting up PKG_ROOT" cd $test_proot -git clone --quiet ${1-git://git.tabularazor.org/~derf/pkg} pkg -cp pkg/include/pkglist pkglist +git clone --quiet ${1-git://git.tabularazor.org/~derf/caretaker} caretaker +cp caretaker/include/pkglist pkglist for repo in ra rb rc; ( mkdir $repo cd $repo |