From 1b6a665ead3af91c3ce9c0a8492300c6f86e6f2a Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 6 Aug 2021 21:56:20 +0300 Subject: Issue warning if added config already has host configs linked --- tests/config.testscript | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'tests/config.testscript') diff --git a/tests/config.testscript b/tests/config.testscript index cb8ed7e..b052a7b 100644 --- a/tests/config.testscript +++ b/tests/config.testscript @@ -227,6 +227,38 @@ deinit += -d prj EOE } +: add-host-linked +: +: Test that the warning is issued when we add configuration that has a host +: configuration linked to it, unless it is already associated with the +: project. +: +{ + $clone_root_prj; + + $* create @cfg &prj-cfg/*** 2>!; + $* create --config-type host @host-cfg &prj-host-cfg/*** 2>!; + + $* link @cfg @host-cfg 2>!; + + $* remove --all 2>!; + + $* add @cfg 2>>/"EOE"; + added configuration @cfg $~/prj-cfg/ 3 target default,forwarded,auto-synchronized + warning: added configuration @cfg already linked with host configurations + info: configuration of host type: $~/prj-host-cfg/ + info: consider adding them to this project + EOE + + $* remove --all 2>!; + + $* add @host-cfg 2>!; + + $* add @cfg 2>>/"EOE" + added configuration @cfg $~/prj-cfg/ 5 target default,forwarded,auto-synchronized + EOE +} + : move : { -- cgit v1.1