From cbd8296c7b86f7fc368d1133da3be3670b7923be Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 9 Dec 2015 11:32:50 +0200 Subject: Clean up command names, add aliases --- tests/test.sh | 398 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 196 insertions(+), 202 deletions(-) (limited to 'tests/test.sh') diff --git a/tests/test.sh b/tests/test.sh index e3c613c..2473bf3 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -236,58 +236,58 @@ stat libfoo unknown ## -## rep-add +## cfg-add ## test cfg-create --wipe -fail rep-add # repository location expected -fail rep-add stable # invalid location -fail rep-add http:// # invalid location +fail cfg-add # repository location expected +fail cfg-add stable # invalid location +fail cfg-add http:// # invalid location # relative path # -test rep-add ./1/bar/stable -fail rep-add ./1/../1/bar/stable # duplicate +test cfg-add ./1/bar/stable +fail cfg-add ./1/../1/bar/stable # duplicate # absolute path # -test rep-add /tmp/1/foo/stable -fail rep-add /tmp/1/../1/foo/stable # duplicate +test cfg-add /tmp/1/foo/stable +fail cfg-add /tmp/1/../1/foo/stable # duplicate # remote URL # -test rep-add http://pkg.example.org/1/testing -fail rep-add http://www.example.org/1/testing # duplicate +test cfg-add http://pkg.example.org/1/testing +fail cfg-add http://www.example.org/1/testing # duplicate ## -## rep-fetch +## cfg-fetch ## test cfg-create --wipe -fail rep-fetch # no repositories +fail cfg-fetch # no repositories # hello repository # test cfg-create --wipe -test rep-add $rep/common/hello -test rep-fetch -test rep-fetch +test cfg-add $rep/common/hello +test cfg-fetch +test cfg-fetch # bar/unstable repository # test cfg-create --wipe -test rep-add $rep/common/bar/unstable -test rep-fetch -test rep-fetch +test cfg-add $rep/common/bar/unstable +test cfg-fetch +test cfg-fetch # both # test cfg-create --wipe -test rep-add $rep/common/hello -test rep-add $rep/common/bar/unstable -test rep-fetch -test rep-fetch +test cfg-add $rep/common/hello +test cfg-add $rep/common/bar/unstable +test cfg-fetch +test cfg-fetch ## @@ -304,14 +304,14 @@ fail pkg-fetch libfoo # package version expected fail pkg-fetch libfoo/1/2/3 # invalid package version fail pkg-fetch libfoo/1.0.0 # no repositories -test rep-add $rep/fetch/t1 +test cfg-add $rep/fetch/t1 fail pkg-fetch libfoo/1.0.0 # no packages -test rep-fetch +test cfg-fetch fail pkg-fetch libfoo/2+1.0.0 # not available test cfg-create --wipe -test rep-add $rep/fetch/t1 -test rep-fetch +test cfg-add $rep/fetch/t1 +test cfg-fetch test pkg-fetch libfoo/1.0.0 stat libfoo/1.0.0 fetched fail pkg-fetch libfoo/1.0.0 @@ -334,8 +334,8 @@ test pkg-purge libfoo # hello # test cfg-create --wipe -test rep-add $rep/common/hello -test rep-fetch +test cfg-add $rep/common/hello +test cfg-fetch test pkg-fetch libhello/1.0.0 test pkg-purge libhello @@ -348,8 +348,8 @@ fail pkg-unpack -r # replace only with existing fail pkg-unpack -e # package directory expected fail pkg-unpack # package name expected -test rep-add $rep/fetch/t1 -test rep-fetch +test cfg-add $rep/fetch/t1 +test cfg-fetch # existing # @@ -391,8 +391,8 @@ test pkg-purge libfoo # hello # test cfg-create --wipe -test rep-add $rep/common/hello -test rep-fetch +test cfg-add $rep/common/hello +test cfg-fetch test pkg-fetch libhello/1.0.0 test pkg-unpack libhello test pkg-purge libhello @@ -499,8 +499,8 @@ stat libfoo unknown ## pkg-configure/pkg-disfigure ## test cfg-create --wipe -test rep-add $rep/common/hello -test rep-fetch +test cfg-add $rep/common/hello +test cfg-fetch fail pkg-configure # package name expected fail pkg-configure config.dist.root=/tmp # ditto @@ -589,8 +589,8 @@ stat libhello unknown # test rep-create repository/1/depend/stable test cfg-create --wipe -test rep-add $rep/depend/stable -test rep-fetch +test cfg-add $rep/depend/stable +test cfg-fetch test pkg-fetch libbar/1.0.0 test pkg-unpack libbar @@ -666,8 +666,8 @@ test rep-create repository/1/status/unstable test cfg-create --wipe stat libfoo/1.0.0 "unknown" stat libfoo "unknown" -test rep-add $rep/status/stable -test rep-fetch +test cfg-add $rep/status/stable +test cfg-fetch stat libfoo/1.0.0 "available" stat libfoo "available 1.0.0" test pkg-fetch libfoo/1.0.0 @@ -677,21 +677,21 @@ stat libfoo "fetched 1.0.0" # multiple versions/revisions # test cfg-create --wipe -test rep-add $rep/status/extra -test rep-fetch +test cfg-add $rep/status/extra +test cfg-fetch stat libbar "available 1.1.0-1" -test rep-add $rep/status/stable -test rep-fetch +test cfg-add $rep/status/stable +test cfg-fetch stat libbar "available 1.1.0-1 1.0.0" test cfg-create --wipe -test rep-add $rep/status/testing -test rep-fetch +test cfg-add $rep/status/testing +test cfg-fetch stat libbar "available 1.1.0 1.0.0-1 1.0.0" test cfg-create --wipe -test rep-add $rep/status/unstable -test rep-fetch +test cfg-add $rep/status/unstable +test cfg-fetch stat libbar "available 2.0.0 1.1.0 1.0.0-1 1.0.0" test pkg-fetch libbar/1.0.0-1 stat libbar "fetched 1.0.0-1; available 2.0.0 1.1.0" @@ -704,8 +704,8 @@ stat libbar "fetched 2.0.0" ## pkg-update ## test cfg-create --wipe -test rep-add $rep/common/hello -test rep-fetch +test cfg-add $rep/common/hello +test cfg-fetch fail pkg-update # package name expected fail pkg-update libhello # no such package @@ -738,8 +738,8 @@ test pkg-purge libhello ## pkg-clean ## test cfg-create --wipe -test rep-add $rep/common/hello -test rep-fetch +test cfg-add $rep/common/hello +test cfg-fetch fail pkg-clean # package name expected fail pkg-clean libhello # no such package @@ -778,8 +778,8 @@ test pkg-purge libhello # build and clean package # test cfg-create --wipe cxx -test rep-add $rep/common/hello -test rep-fetch +test cfg-add $rep/common/hello +test cfg-fetch test pkg-fetch libhello/1.0.0 test pkg-unpack libhello test pkg-configure libhello @@ -788,14 +788,8 @@ test pkg-clean libhello test pkg-disfigure libhello test pkg-purge libhello - -## -## High-level commands. -## - - ## -## build +## pkg-build ## # 1 (libfoo) @@ -803,47 +797,47 @@ test pkg-purge libhello test rep-create repository/1/satisfy/t1 test cfg-create --wipe -fail build -p # package name expected -fail build -p libfoo # unknown package -fail build -p libfoo/1.0.0 # unknown package -test build -p repository/1/satisfy/libfoo-1.1.0.tar.gz <