From e771c6b80168de37b74cc57dec502dfa418a19a6 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 15 May 2018 22:32:38 +0300 Subject: Add some more tests --- tests/new.test | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) (limited to 'tests/new.test') diff --git a/tests/new.test b/tests/new.test index cdb1537..ab9e25a 100644 --- a/tests/new.test +++ b/tests/new.test @@ -4,9 +4,9 @@ .include common.test -status += -d prj +cxx = "config.cxx=$config.cxx" -cxx = cc "config.cxx=$config.cxx" +status += -d prj : exe { @@ -14,7 +14,7 @@ cxx = cc "config.cxx=$config.cxx" created new executable project prj in $~/prj/ EOE - $build prj/ 2>>/EOE + $build prj/ $cxx 2>>/EOE c++ prj/prj/cxx{prj} ld prj/prj/exe{prj} EOE @@ -26,18 +26,37 @@ cxx = cc "config.cxx=$config.cxx" created new library project libprj in $~/libprj/ EOE - $build libprj/ 2>>/~%EOE% + $build libprj/ $cxx 2>>/~%EOE% %.{4} %ld libprj/.+%{3} EOE } +: pkg +: +: Test creating a library as a separate package in the project. +: +{ + $* -t empty prj 2>>/"EOE" &prj/***; + created new empty project prj in $~/prj/ + EOE + + $* --package -t lib libprj -d prj 2>>/"EOE"; + created new library package libprj in $~/prj/libprj/ + EOE + + $build prj/libprj/ $cxx 2>>/~%EOE% + %.{4} + %ld prj/libprj/.+%{3} + EOE +} + : cfg { : dir-and-name : { - $* -C prj-config @cfg prj $cxx 2>>/~"%EOE%" &prj/*** &prj-config/***; + $* -C prj-config @cfg prj cc $cxx 2>>/~"%EOE%" &prj/*** &prj-config/***; created new executable project prj in $~/prj/ created configuration @cfg $~/prj-config/ \(1, default, forwarded, auto-synchronized\) synchronizing: @@ -56,12 +75,13 @@ cxx = cc "config.cxx=$config.cxx" : name : - : Test deducing the configuration directory path from project source - : directory path and configuration name. Here we also use the dash-prefixed - : name (as in Windows PowerShell where the leading '@' character is special). + : Test deducing the configuration directory path from the project source + : directory path and the configuration name. Here we also use the + : dash-prefixed name (as in Windows PowerShell where the leading '@' + : character is special). : { - $* -C -@cfg prj $cxx 2>>/~"%EOE%" &prj/*** &prj-cfg/***; + $* -C -@cfg prj cc $cxx 2>>/~"%EOE%" &prj/*** &prj-cfg/***; created new executable project prj in $~/prj/ created configuration @cfg $~/prj-cfg/ \(1, default, forwarded, auto-synchronized\) synchronizing: -- cgit v1.1