aboutsummaryrefslogtreecommitdiff
path: root/tests/new.testscript
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-03-08 13:51:21 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-03-08 13:51:21 +0200
commitc9be1347aed9bca396606d8f0c93bedc4f4706a8 (patch)
tree459ccef0ebf095874a16dd50fb365fb6597cbb5c /tests/new.testscript
parentf599f30ee51c8a6f796d5b9a35e8e17ee54333ee (diff)
Add support for bdep-new --subdirectory mode, no-version -t=lib sub-option
Diffstat (limited to 'tests/new.testscript')
-rw-r--r--tests/new.testscript74
1 files changed, 74 insertions, 0 deletions
diff --git a/tests/new.testscript b/tests/new.testscript
index ca33056..8e8fd75 100644
--- a/tests/new.testscript
+++ b/tests/new.testscript
@@ -92,6 +92,18 @@ status += -d prj
EOE
}
+ : lib-no-version
+ :
+ {
+ $* -t lib,unit-tests,no-version -l c++ libfoo 2>>/"EOE" &libfoo/***;
+ created new library project libfoo in $~/libfoo/
+ EOE
+
+ $build libfoo/ $cxx 2>>~%EOE%
+ %(c\+\+|ar|ld) .+%{10}
+ EOE
+ }
+
: lib-binless
:
{
@@ -220,6 +232,68 @@ status += -d prj
EOE
}
}
+
+ : sub
+ :
+ {
+ : exe
+ :
+ : Test adding a library source subdirectory to an executable project.
+ :
+ {
+ $* -t exe prj 2>>/"EOE" &prj/***;
+ created new executable project prj in $~/prj/
+ EOE
+
+ $* --subdirectory -t lib libprj -d prj 2>>/"EOE";
+ created new library source subdirectory libprj in $~/prj/libprj/
+ EOE
+
+ $build prj/ $cxx 2>>~%EOE%
+ %(c\+\+|ar|ld) .+%{6}
+ EOE
+ }
+
+ : bare
+ :
+ : Test filling a bare project with source subdirectories.
+ :
+ {
+ $* -t bare prj 2>>/"EOE" &prj/***;
+ created new bare project prj in $~/prj/
+ EOE
+
+ $* --subdirectory -t lib libprj -d prj 2>>/"EOE";
+ created new library source subdirectory libprj in $~/prj/libprj/
+ EOE
+
+ $* --subdirectory -t exe prj -d prj 2>>/"EOE";
+ created new executable source subdirectory prj in $~/prj/prj/
+ EOE
+
+ $build prj/ $cxx 2>>~%EOE%
+ %(c\+\+|ar|ld) .+%{6}
+ EOE
+ }
+
+ : nested
+ :
+ : Test adding a source subdirectories to a subdirectory.
+ :
+ {
+ $* -t bare prj 2>>/"EOE" &prj/***;
+ created new bare project prj in $~/prj/
+ EOE
+
+ $* --subdirectory -t lib,unit-tests prj -d prj -o prj/core/prj 2>>/"EOE";
+ created new library source subdirectory prj in $~/prj/core/prj/
+ EOE
+
+ $build prj/ $cxx 2>>~%EOE%
+ %(c\+\+|ar|ld) .+%{8}
+ EOE
+ }
+ }
}
: cfg