aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2021-08-18 15:00:57 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-08-18 18:19:11 +0300
commitba8e0b9f9866b47bc61b49323e4293ba90826e80 (patch)
tree9a5f12da8767291124b139ad4ecccf328f56b446 /tests
parentfeb93edb4820feceb602b1e081f782e2e0bc45bc (diff)
Add support for config-unlink sub-command
Diffstat (limited to 'tests')
-rw-r--r--tests/config.testscript16
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/config.testscript b/tests/config.testscript
index b052a7b..f57e936 100644
--- a/tests/config.testscript
+++ b/tests/config.testscript
@@ -391,7 +391,21 @@ deinit += -d prj
$* create -- @cfg1 $config_cxx 2>! &prj-cfg1/***;
$* create -- @cfg2 $config_cxx 2>! &prj-cfg2/***;
- $* link @cfg1 @cfg2 2>>EOE
+ $* link @cfg1 @cfg2 2>>EOE;
linked configuration @cfg1 (target) with configuration @cfg2 (target)
EOE
+
+ $* link @cfg1 @cfg2 2>>/~%EOE% != 0;
+ %error: configuration with uuid .{36} is already linked as \.\./prj-cfg2/%
+ EOE
+
+ # While at it test the config-unlink subcommand.
+ #
+ $* unlink @cfg1 @cfg2 2>>EOE;
+ unlinked configuration @cfg1 from configuration @cfg2
+ EOE
+
+ $* unlink @cfg1 @cfg2 2>>/"EOE" != 0
+ error: no configuration with path $~/prj-cfg2/ is linked with $~/prj-cfg1/
+ EOE
}