From cbd7cabcc3e6b24e80521bfec230e905f420ff4f Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 11 May 2018 21:48:28 +0300 Subject: Add some tests --- tests/new.test | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 tests/new.test (limited to 'tests/new.test') diff --git a/tests/new.test b/tests/new.test new file mode 100644 index 0000000..96cb4c5 --- /dev/null +++ b/tests/new.test @@ -0,0 +1,45 @@ +# file : tests/new.test +# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +.include common.test + +: exe +{ + $* -t exe hello 2>>/"EOE" &hello/***; + created new executable project hello in $~/hello/ + EOE + + $build hello/ 2>>/EOE + c++ hello/hello/cxx{hello} + ld hello/hello/exe{hello} + EOE +} + +: lib +{ + $* -t lib libhello 2>>/"EOE" &libhello/***; + created new library project libhello in $~/libhello/ + EOE + + # We build the project by chunks to make sure the output is reproducible (no, + # -s doesn't really help). + # + echo "#include " >+libhello/libhello/hello.hxx; + + $build libhello/libhello/libs{hello} 2>>/EOE; + ver libhello/libhello/version.hxx.in + c++ libhello/libhello/cxx{hello} + ld libhello/libhello/libs{hello} + EOE + + $build libhello/libhello/ 2>>/EOE; + c++ libhello/libhello/cxx{hello} + ld libhello/libhello/liba{hello} + EOE + + $build libhello/ 2>>/EOE + c++ libhello/tests/basics/cxx{driver} + ld libhello/tests/basics/exe{driver} + EOE +} -- cgit v1.1