From ddafa0f3475fe532a66879b807b0a8f47ecb201e Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 19 Jul 2022 20:20:47 +0300 Subject: Fail if no module specified for being created configuration --- tests/config.testscript | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'tests/config.testscript') diff --git a/tests/config.testscript b/tests/config.testscript index b02a2b2..17cfcb1 100644 --- a/tests/config.testscript +++ b/tests/config.testscript @@ -184,6 +184,22 @@ deinit += -d prj created configuration $~/cfg/ 1 target default,forwarded,auto-synchronized EOE } + + : no-module + { + $clone_root_prj; + + $* create @cfg 2>>EOE != 0; + error: no module(s) specified for configuration to be created + info: for example, for C/C++ configuration specify 'cc' + info: use '--' to create configuration without modules + info: for example: bdep config create ... -- + EOE + + $* create @cfg -- 2>>/"EOE" &prj-cfg/*** + created configuration @cfg $~/prj-cfg/ 1 target default,forwarded,auto-synchronized + EOE + } } : add @@ -257,8 +273,8 @@ deinit += -d prj { $clone_root_prj; - $* create @cfg &prj-cfg/*** 2>!; - $* create --config-type host @host-cfg &prj-host-cfg/*** 2>!; + $* create @cfg -- &prj-cfg/*** 2>!; + $* create --config-type host @host-cfg -- &prj-host-cfg/*** 2>!; $* link @cfg @host-cfg 2>!; -- cgit v1.1