aboutsummaryrefslogtreecommitdiff
path: root/tests/new.testscript
diff options
context:
space:
mode:
Diffstat (limited to 'tests/new.testscript')
-rw-r--r--tests/new.testscript96
1 files changed, 95 insertions, 1 deletions
diff --git a/tests/new.testscript b/tests/new.testscript
index 34a45e1..6fc0b93 100644
--- a/tests/new.testscript
+++ b/tests/new.testscript
@@ -331,7 +331,7 @@ status += -d prj
EOE
}
- # Test create-from-existin functionality.
+ # Test create-from-existing functionality.
#
: exist
:
@@ -1133,6 +1133,100 @@ status += -d prj
}
}
+ : flat-layouts
+ :
+ : Here we test layouts where the source directory is the project/package
+ : root. Note that such layouts use non-recursive wildcards in buildfiles.
+ :
+ {
+ : exe
+ :
+ {
+ : basics
+ :
+ {
+ $* -l c++ -t exe,no-subdir hello 2>>/"EOE" &hello/***;
+ created new executable project hello in $~/hello/
+ EOE
+
+ mkdir hello/tests;
+ touch hello/tests/hello.test.cxx;
+
+ $build hello/ $config_cxx 2>>~%EOE%
+ %(c\+\+|ld) .+%{2}
+ EOE
+ }
+
+ : unit-tests
+ :
+ {
+ $* -l c++ -t exe,no-subdir,unit-tests hello 2>>/"EOE" &hello/***;
+ created new executable project hello in $~/hello/
+ EOE
+
+ mkdir hello/tests;
+ touch hello/tests/hello.test.cxx;
+
+ $build hello/ $config_cxx 2>>~%EOE%
+ %(c\+\+|ld|ar) .+%{5}
+ EOE
+ }
+ }
+
+ : lib
+ :
+ {
+ : basics
+ :
+ {
+ $* -l c++ -t lib,no-subdir,no-version,no-tests libhello 2>>/"EOE" &libhello/***;
+ created new library project libhello in $~/libhello/
+ EOE
+
+ mkdir libhello/tests;
+ touch libhello/tests/hello.test.cxx;
+
+ $build libhello/ $config_cxx 2>>~%EOE%
+ %(c\+\+|ld|ar) .+%{4}
+ EOE
+ }
+
+ : unit-tests
+ :
+ {
+ : binful
+ :
+ {
+ $* -l c++ -t lib,no-subdir,no-version,no-tests,unit-tests libhello 2>>/"EOE" &libhello/***;
+ created new library project libhello in $~/libhello/
+ EOE
+
+ mkdir libhello/tests;
+ touch libhello/tests/hello.test.cxx;
+
+ $build libhello/ $config_cxx 2>>~%EOE%
+ %(c\+\+|ld|ar) .+%{8}
+ EOE
+ }
+
+ : binless
+ :
+ {
+ $* -l c++ -t lib,no-subdir,no-version,no-tests,unit-tests,binless libhello 2>>/"EOE" &libhello/***;
+ created new library project libhello in $~/libhello/
+ EOE
+
+ mkdir libhello/tests;
+ touch libhello/tests/hello.test.cxx;
+
+ $build libhello/ $config_cxx 2>>~%EOE%
+ %(c\+\+|ld) .+%{2}
+ EOE
+ }
+ }
+ }
+ }
+
: common-source-layouts
:
: Here we smoke test the common source code layouts listed in bdep-new(1).