From 5b2f02086f9295cf16e19cb3b7e5369b313bb422 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 12 Nov 2020 14:21:26 +0300 Subject: Add --all-pattern option to pkg-{update,clean,test,install,uninstall} commands --- tests/pkg-test.testscript | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'tests/pkg-test.testscript') diff --git a/tests/pkg-test.testscript b/tests/pkg-test.testscript index 5e212f4..c8b4a8e 100644 --- a/tests/pkg-test.testscript +++ b/tests/pkg-test.testscript @@ -42,6 +42,13 @@ test.options += --build-option -s info: run 'bpkg help pkg-test' for more information EOE + : all-all-pattern + : + $* --all --all-pattern 'lib*' 2>>EOE != 0 + error: both --all|-a and --all-pattern specified + info: run 'bpkg help pkg-test' for more information + EOE + : all-name : $* --all libbaz 2>>EOE != 0 @@ -49,6 +56,13 @@ test.options += --build-option -s info: run 'bpkg help pkg-test' for more information EOE + : all-pattern-name + : + $* --all-pattern 'lib*' libbaz 2>>EOE != 0 + error: both --all-pattern and package argument specified + info: run 'bpkg help pkg-test' for more information + EOE + : recursive-immediate : $* libbaz --recursive --immediate 2>>~%EOE% != 0 @@ -92,6 +106,29 @@ test.options += --build-option -s } } +: all-pattern +: +{ + : match + : + { + $clone_root_cfg; + + $* --all-pattern 'libf*' --all-pattern 'lib*' --all-pattern 'libz*' 2>>~%EOE% + %info: .+ has nothing to test% + tested libbaz/0.0.3 + EOE + } + + : not-match + : + { + $clone_root_cfg; + + $* --all-pattern 'libf*' 2>'info: nothing to test' + } +} + : immediate : { -- cgit v1.1