summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-07-11 01:17:18 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2009-07-11 01:21:48 +0200
commit324568044af4287dd25a90dc143ea26df565d1e3 (patch)
tree0bcf9ff698d825c50a72d85c02560d88782e1915 /test
parent389bd0bcb530fee9c92ed9c419d82303a322274d (diff)
Renamed pkg to caretaker
Diffstat (limited to 'test')
-rw-r--r--test/add18
-rwxr-xr-xtest/main44
-rw-r--r--test/pull4
-rw-r--r--test/push2
-rw-r--r--test/remove20
-rw-r--r--test/setup4
6 files changed, 46 insertions, 46 deletions
diff --git a/test/add b/test/add
index f319813..8094c2b 100644
--- a/test/add
+++ b/test/add
@@ -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
}
diff --git a/test/main b/test/main
index ff5f596..3544ed0 100755
--- a/test/main
+++ b/test/main
@@ -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 ]] {
diff --git a/test/pull b/test/pull
index c6a410a..9a04867 100644
--- a/test/pull
+++ b/test/pull
@@ -1,6 +1,6 @@
## vim:ft=zsh
if [[ $repo == $file ]] {
- echo "# pkg pull"
- pkg pull
+ echo "# ct pull"
+ ct pull
[[ -f $pkgdir/$repo/baz ]]
}
diff --git a/test/push b/test/push
index 8463e61..d4f1894 100644
--- a/test/push
+++ b/test/push
@@ -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
}
diff --git a/test/setup b/test/setup
index 9c4fb66..14cfd7b 100644
--- a/test/setup
+++ b/test/setup
@@ -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