diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2021-03-08 20:33:54 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2021-03-09 11:32:22 +0300 |
commit | 9bcf92ef422999dca6c7fe00125c48065cbab977 (patch) | |
tree | 6e6d8651d016822be2f8c6878a55fdeb3b7806e9 /tests | |
parent | 04b8015ce8c80be3a4b41deeece65d8a759ea5b4 (diff) |
Use non-recursive wildcard in bdep-new-generated buildfiles when source directory is project/package root
Diffstat (limited to 'tests')
-rw-r--r-- | tests/new.testscript | 96 |
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). |