diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-10-10 08:12:50 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-10-10 08:12:50 +0200 |
commit | 4e3faacbc3c27e1d01ca95697b34db82cdecdb9d (patch) | |
tree | 5144d4bddbb376318fcaf20dafa0c391ddce93b1 /bpkg/test.sh | |
parent | 803acc23f8cea3079681e9e624702e104adfd775 (diff) |
Implement --replace|-r mode for pkg-fetch
Diffstat (limited to 'bpkg/test.sh')
-rwxr-xr-x | bpkg/test.sh | 37 |
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 # |