aboutsummaryrefslogtreecommitdiff
path: root/bpkg/test.sh
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-09-25 15:19:16 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-09-25 15:19:16 +0200
commit8049a4de3a5d77d28f9dbc6b2d712b280548a08a (patch)
tree2ade1611947f617120380f22647cdf4d3df1c0ff /bpkg/test.sh
parent8aa9fd02fdbe7b2de9cbd02564431d74b620b1d9 (diff)
Implement archive fetching, complete pkg-fetch
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
#