aboutsummaryrefslogtreecommitdiff
path: root/bpkg/test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bpkg/test.sh')
-rwxr-xr-xbpkg/test.sh37
1 files changed, 25 insertions, 12 deletions
diff --git a/bpkg/test.sh b/bpkg/test.sh
index a806a25..f787baa 100755
--- a/bpkg/test.sh
+++ b/bpkg/test.sh
@@ -183,30 +183,43 @@ test rep-fetch
##
## pkg-fetch
##
-
+test rep-create ../tests/repository/1/fetch/t1
test cfg-create --wipe
fail pkg-fetch -e # archive expected
fail pkg-fetch -e ./no-such-file # archive does not exist
-fail pkg-fetch # package name expected
-fail pkg-fetch libhello # package version expected
-fail pkg-fetch libhello/1/2/3 # invalid package version
+fail pkg-fetch # package name expected
+fail pkg-fetch libfoo # package version expected
+fail pkg-fetch libfoo/1/2/3 # invalid package version
-fail pkg-fetch libhello/1.0.0 # no repositories
-test rep-add $rep
-fail pkg-fetch libhello/1.0.0 # no packages
+fail pkg-fetch libfoo/1.0.0 # no repositories
+test rep-add ../tests/repository/1/fetch/t1
+fail pkg-fetch libfoo/1.0.0 # no packages
test rep-fetch
-fail pkg-fetch libhello/2+1.0.0 # not available
+fail pkg-fetch libfoo/2+1.0.0 # not available
# local
#
test cfg-create --wipe
-test rep-add $rep
+test rep-add ../tests/repository/1/fetch/t1
test rep-fetch
-test pkg-fetch libhello/1.0.0
-test pkg-unpack libhello
-test pkg-purge libhello
+test pkg-fetch libfoo/1.0.0
+stat libfoo/1.0.0 fetched
+fail pkg-fetch libfoo/1.0.0
+fail pkg-fetch -e ../tests/repository/1/fetch/t1/libfoo-1.0.0.tar.gz
+test pkg-purge libfoo
+test pkg-fetch -e ../tests/repository/1/fetch/t1/libfoo-1.0.0.tar.gz
+stat libfoo/1.0.0 fetched
+test pkg-unpack libfoo
+fail pkg-fetch -r libfoo/1.0.0
+fail pkg-fetch -r -e ../tests/repository/1/fetch/t1/libfoo-1.0.0.tar.gz
+test pkg-purge -k libfoo
+test pkg-fetch -r libfoo/1.1.0
+stat libfoo/1.1.0 fetched
+test pkg-fetch -r -e ../tests/repository/1/fetch/t1/libfoo-1.0.0.tar.gz
+stat libfoo/1.0.0 fetched
+test pkg-purge libfoo
# remote
#