From d1d9fbc899be37bba7b05f31ac5c7a4d15d64811 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 4 Sep 2018 14:32:11 +0300 Subject: Rename .test/test{} to .testscript/testscript{} --- tests/status.testscript | 105 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 tests/status.testscript (limited to 'tests/status.testscript') 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 \(@ | --config|-c | --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 <+prj/repositories.manifest; + : + role: prerequisite + location: ../libprj + type: dir + EOI + + cat <+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 +} -- cgit v1.1