aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2021-08-06 21:56:20 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-08-09 13:55:06 +0300
commit1b6a665ead3af91c3ce9c0a8492300c6f86e6f2a (patch)
tree0d95bd49fc7a9095eb0e7ea5b60583fc311afe13 /tests
parentdc02a15c89993634f7336d5bd54bd9f37746bfbe (diff)
Issue warning if added config already has host configs linked
Diffstat (limited to 'tests')
-rw-r--r--tests/config.testscript32
1 files changed, 32 insertions, 0 deletions
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
:
{