aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2022-07-20 17:37:19 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2022-07-20 18:03:38 +0300
commit7f52d9bd3627dd3717ea95d7c8e84ae8ced5acaf (patch)
treeeae0ddca3c0878f20a4aaf4f3b097e9262cd5fc0 /tests
parent0e7d370b4056bb92d6e9a2660d4b3db8fe5df75a (diff)
Add --all and --all-pattern options to pkg-drop command
Diffstat (limited to 'tests')
-rw-r--r--tests/pkg-drop.testscript61
1 files changed, 61 insertions, 0 deletions
diff --git a/tests/pkg-drop.testscript b/tests/pkg-drop.testscript
index 9029970..577c5fb 100644
--- a/tests/pkg-drop.testscript
+++ b/tests/pkg-drop.testscript
@@ -39,6 +39,22 @@ $* 2>>EOE != 0
info: run 'bpkg help pkg-drop' for more information
EOE
+: all-all-pattern
+:
+$clone_cfg;
+$* --all --all-pattern 'lib*' 2>>EOE != 0
+ error: both --all|-a and --all-pattern specified
+ info: run 'bpkg help pkg-drop' for more information
+ EOE
+
+: all-pattern-name
+:
+$clone_cfg;
+$* --all-pattern 'lib*' libbaz 2>>EOE != 0
+ error: both --all-pattern and package argument specified
+ info: run 'bpkg help pkg-drop' for more information
+ EOE
+
: unknown-package
:
$clone_cfg;
@@ -765,3 +781,48 @@ $* libfoo/1.0.0 2>>~%EOE% != 0
EOE
}
}
+
+: all-options
+:
+{
+ +$clone_cfg && $rep_add $rep/t4b $rep/t4c && $rep_fetch
+
+ test.arguments += --yes
+
+ : all
+ :
+ {
+ $clone_cfg;
+
+ $pkg_build libbaz libbar;
+
+ $* --all 2>>EOO
+ disfigured libbaz
+ disfigured libbar
+ disfigured libfoo
+ purged libbaz
+ purged libbar
+ purged libfoo
+ EOO
+ }
+
+ : all-pattern
+ :
+ {
+ $clone_cfg;
+
+ $pkg_build libbaz libbar libfoo;
+
+ $* --all-pattern 'libb*' 2>>EOO;
+ disfigured libbaz
+ disfigured libbar
+ purged libbaz
+ purged libbar
+ EOO
+
+ $* --all-pattern '*' 2>>EOO
+ disfigured libfoo
+ purged libfoo
+ EOO
+ }
+}