aboutsummaryrefslogtreecommitdiff
path: root/tests/init.test
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-05-14 19:18:09 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-05-14 19:18:09 +0300
commit58cd2d5788147c80d6f266b6984615bbd23516d7 (patch)
treefc8c25816553361390b435db1c9fab0eed84420b /tests/init.test
parentcbd7cabcc3e6b24e80521bfec230e905f420ff4f (diff)
Add deinit command test
Diffstat (limited to 'tests/init.test')
-rw-r--r--tests/init.test28
1 files changed, 22 insertions, 6 deletions
diff --git a/tests/init.test b/tests/init.test
index 0200277..43ce441 100644
--- a/tests/init.test
+++ b/tests/init.test
@@ -2,12 +2,16 @@
# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
+# Here we test both init and deinit commands.
+#
+
.include common.test project.test
new += 2>!
status += --all
+deinit += -d prj
-test.cleanups += &prj/build/bootstrap/*** &?prj-cfg/***
+cxx = cc "config.cxx=$config.cxx"
: cfg-create
:
@@ -17,7 +21,7 @@ test.cleanups += &prj/build/bootstrap/*** &?prj-cfg/***
{
$clone_prj;
- $* -C prj-cfg @cfg cc "config.cxx=$config.cxx" 'config.cc.poptions=-DTEST' 2>>/~"%EOE%";
+ $* -C @cfg $cxx 'config.cc.poptions=-DTEST' 2>>/~"%EOE%" &prj-cfg/***;
initializing in project $~/prj/
created configuration @cfg $~/prj-cfg/ \(1, default, forwarded, auto-synchronized\)
synchronizing:
@@ -36,22 +40,28 @@ test.cleanups += &prj/build/bootstrap/*** &?prj-cfg/***
ln prj-cfg/prj/prj/exe{prj} -> prj/prj/
EOE
- $build prj-cfg/ 2>>/EOE
+ $build prj-cfg/ 2>>/EOE;
info: dir{prj-cfg/} is up to date
EOE
+
+ $deinit 2>>/"EOE"
+ deinitializing in project $~/prj/
+ synchronizing:
+ drop prj
+ EOE
}
: cfg-add
:
{
- create_cfg = $bpkg create cc "config.cxx=$config.cxx" -d 2>!
+ create_cfg = $bpkg create $cxx -d 2>!
$clone_prj;
$create_cfg prj-cfg1/ &prj-cfg1/***;
$create_cfg prj-cfg2/ &prj-cfg2/***;
- $* -A prj-cfg1 @cfg1 2>>/~"%EOE%";
+ $* -A @cfg1 2>>/~"%EOE%";
initializing in project $~/prj/
added configuration @cfg1 $~/prj-cfg1/ \(1, default, forwarded, auto-synchronized\)
synchronizing:
@@ -85,10 +95,16 @@ test.cleanups += &prj/build/bootstrap/*** &?prj-cfg/***
ld prj-cfg2/prj/prj/exe{prj}
EOE
- $build prj/ 2>>/EOE &prj/prj/prj$exe
+ $build prj/ 2>>/EOE &prj/prj/prj$exe;
ln prj-cfg1/prj/prj/exe{prj} -> prj/prj/
info: prj-cfg1/dir{prj/} is up to date
EOE
+
+ $deinit 2>>/"EOE"
+ deinitializing in project $~/prj/
+ synchronizing:
+ drop prj
+ EOE
}
# @@ Test initializing a package rather than project.