aboutsummaryrefslogtreecommitdiff
path: root/bpkg/test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bpkg/test.sh')
-rwxr-xr-xbpkg/test.sh41
1 files changed, 37 insertions, 4 deletions
diff --git a/bpkg/test.sh b/bpkg/test.sh
index d1ab6f2..63b6fb2 100755
--- a/bpkg/test.sh
+++ b/bpkg/test.sh
@@ -163,17 +163,50 @@ test cfg-create --wipe
test rep-add http://pkg.cppget.org/1/hello
test rep-fetch
-## @@
##
+## pkg-fetch
##
-test cfg-create --wipe config.cxx=g++-4.9 cxx config.install.root=/tmp/install
-stat unknown
+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 libhello 1.0.0 # no repositories
+test rep-add $rep
+fail pkg-fetch libhello 1.0.0 # no packages
+test rep-fetch
+fail pkg-fetch libhello 2+1.0.0 # not available
+
+# local
+#
+test cfg-create --wipe
+test rep-add $rep
+test rep-fetch
+test pkg-fetch libhello 1.0.0
+test pkg-unpack libhello
+test pkg-purge libhello
+
+# remote
+#
+test cfg-create --wipe
+test rep-add http://pkg.cppget.org/1/hello
+test rep-fetch
+#test pkg-fetch libheavy 1.0.0
+test pkg-fetch libhello 1.0.0
+test pkg-unpack libhello
+test pkg-purge libhello
+
+## @@
##
-## pkg-fetch
##
+test cfg-create --wipe config.cxx=g++-4.9 cxx config.install.root=/tmp/install
+stat unknown
# fetch existing archive
#