aboutsummaryrefslogtreecommitdiff
path: root/tests/pkg-test.testscript
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pkg-test.testscript')
-rw-r--r--tests/pkg-test.testscript40
1 files changed, 38 insertions, 2 deletions
diff --git a/tests/pkg-test.testscript b/tests/pkg-test.testscript
index 612d53f..c8b4a8e 100644
--- a/tests/pkg-test.testscript
+++ b/tests/pkg-test.testscript
@@ -1,5 +1,4 @@
# file : tests/pkg-test.testscript
-# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
.include common.testscript config.testscript remote.testscript
@@ -20,7 +19,7 @@
# Prepare repositories used by tests if running in the local mode.
#
-+if ($remote != true)
++if! $remote
rep_create += 2>!
cp -r $src/t0a $out/t0a && $rep_create $out/t0a &$out/t0a/packages.manifest
@@ -43,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
@@ -50,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
@@ -93,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
:
{