diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-09-04 14:32:11 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-09-04 14:49:21 +0300 |
commit | d1d9fbc899be37bba7b05f31ac5c7a4d15d64811 (patch) | |
tree | 99722bfda82125c5ad383917df0af794ff1b9e1f /tests/status.testscript | |
parent | 971b29ac8c45da1659a57421f95d4caa237ee6be (diff) |
Rename .test/test{} to .testscript/testscript{}
Diffstat (limited to 'tests/status.testscript')
-rw-r--r-- | tests/status.testscript | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/tests/status.testscript b/tests/status.testscript new file mode 100644 index 0000000..905281e --- /dev/null +++ b/tests/status.testscript @@ -0,0 +1,105 @@ +# file : tests/status.testscript +# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +.include common.testscript project.testscript + +cxx = cc config.cxx="$recall($cxx.path)" + +new += 2>! +init += $cxx -d prj 2>! +sync += -d prj 2>! +deinit += -d prj + +: no-cfg +: +{ + $clone_prj; + + $* 2>>/"EOE" != 0 + error: no default configuration in project $~/prj/ + info: use \(@<cfg-name> | --config|-c <cfg-dir> | --all|-a\) to specify configuration explicitly + EOE +} + +: single-cfg +: +{ + $clone_prj; + + $init -C @cfg &prj-cfg/***; + + $* >'prj configured 0.1.0-a.0.19700101000000'; + + $deinit 2>>/"EOE" + deinitializing in project $~/prj/ + synchronizing: + drop prj + EOE +} + +: multi-cfg +: +{ + $clone_prj; + + $init -C @cfg1 &prj-cfg1/***; + $init -C @cfg2 &prj-cfg2/***; + + $* @cfg2 >'prj configured 0.1.0-a.0.19700101000000'; + + $* --all >>EOO; + in configuration @cfg1: + prj configured 0.1.0-a.0.19700101000000 + + in configuration @cfg2: + prj configured 0.1.0-a.0.19700101000000 + EOO + + $deinit 2>>/"EOE" + deinitializing in project $~/prj/ + synchronizing: + drop prj + EOE +} + +: dependency +: +{ + $clone_prj; + + $init -C @cfg &prj-cfg/***; + + $new -t lib libprj &libprj/***; + + cat <<EOI >+prj/repositories.manifest; + : + role: prerequisite + location: ../libprj + type: dir + EOI + + cat <<EOI >+prj/manifest; + depends: libprj + EOI + + $* --recursive >>EOO 2>>/"EOE"; # Note: implicitly fetches in cfg. + prj configured 0.1.0-a.0.19700101000000 available 0.1.0-a.0.19700101000000#1 + EOO + fetching dir:$~/libprj \(prerequisite of dir:$~/prj\) + EOE + + $sync; + + $* --recursive >>~%EOO%; + prj configured 0.1.0-a.0.19700101000000#1 + % libprj configured 0.+% + EOO + + $deinit 2>>/"EOE" + deinitializing in project $~/prj/ + synchronizing: + drop prj + drop libprj + EOE +} |