From 8af0f196574167976f514d215f7f726f848cd123 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 3 Oct 2023 18:58:46 +0300 Subject: Add support for no-symexport and auto-symexport sub-options for libraries in bdep-new --- tests/new.testscript | 148 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) (limited to 'tests/new.testscript') diff --git a/tests/new.testscript b/tests/new.testscript index a55ef0b..49f43b1 100644 --- a/tests/new.testscript +++ b/tests/new.testscript @@ -458,6 +458,80 @@ status += -d prj EOE } + : lib-no-symexport + : + { + $* -t lib,no-symexport -l c++ libfoo 2>>/"EOE" &libfoo/***; + created new library project libfoo in $~/libfoo/ + EOE + + if $posix + $build libfoo/ $config_cxx 2>>~%EOE% + %(version|c\+\+|ar|ld) .+%{7} + EOE + else + $build 'clean:' libfoo/ 2>>~%EOE% + %info: .+ is clean% + EOE + end + } + + : lib-auto-symexport + : + { + : basics + : + { + $* -t lib,auto-symexport -l c++ libfoo 2>>/"EOE" &libfoo/***; + created new library project libfoo in $~/libfoo/ + EOE + + $build libfoo/ $config_cxx 2>>~%EOE%; + %(version|c\+\+|ar|ld|def) .+%{9,10} + EOE + + if ($cxx.target.system == 'win32-msvc') + test -f libfoo/libfoo/foo.def + end + } + + : unit-tests + : + { + $* -t lib,auto-symexport,unit-tests -l c++ libfoo 2>>/"EOE" &libfoo/***; + created new library project libfoo in $~/libfoo/ + EOE + + $build libfoo/ $config_cxx 2>>~%EOE% + %(version|c\+\+|ar|ld|def) .+%{11,12} + EOE + } + + : split + : + { + $* -t lib,auto-symexport,split -l c++ libfoo 2>>/"EOE" &libfoo/***; + created new library project libfoo in $~/libfoo/ + EOE + + $build libfoo/ $config_cxx 2>>~%EOE% + %(version|c\+\+|ar|ld|def) .+%{9,10} + EOE + } + + : unit-tests-split + : + { + $* -t lib,auto-symexport,unit-tests,split -l c++ libfoo 2>>/"EOE" &libfoo/***; + created new library project libfoo in $~/libfoo/ + EOE + + $build libfoo/ $config_cxx 2>>~%EOE% + %(version|c\+\+|ar|ld|def) .+%{11,12} + EOE + } + } + # C versions of the above. # : exe-c @@ -762,6 +836,80 @@ status += -d prj EOE } + : lib-c-no-symexport + : + { + $* -t lib,no-symexport -l c libfoo 2>>/"EOE" &libfoo/***; + created new library project libfoo in $~/libfoo/ + EOE + + if $posix + $build libfoo/ $config_c 2>>~%EOE% + %(version|c|ar|ld) .+%{7} + EOE + else + $build 'clean:' libfoo/ 2>>~%EOE% + %info: .+ is clean% + EOE + end + } + + : lib-c-auto-symexport + : + { + : basics + : + { + $* -t lib,auto-symexport -l c libfoo 2>>/"EOE" &libfoo/***; + created new library project libfoo in $~/libfoo/ + EOE + + $build libfoo/ $config_c 2>>~%EOE%; + %(version|c|ar|ld|def) .+%{9,10} + EOE + + if ($c.target.system == 'win32-msvc') + test -f libfoo/libfoo/foo.def + end + } + + : unit-tests + : + { + $* -t lib,auto-symexport,unit-tests -l c libfoo 2>>/"EOE" &libfoo/***; + created new library project libfoo in $~/libfoo/ + EOE + + $build libfoo/ $config_c 2>>~%EOE% + %(version|c|ar|ld|def) .+%{11,12} + EOE + } + + : split + : + { + $* -t lib,auto-symexport,split -l c libfoo 2>>/"EOE" &libfoo/***; + created new library project libfoo in $~/libfoo/ + EOE + + $build libfoo/ $config_c 2>>~%EOE% + %(version|c|ar|ld|def) .+%{9,10} + EOE + } + + : unit-tests-split + : + { + $* -t lib,auto-symexport,unit-tests,split -l c libfoo 2>>/"EOE" &libfoo/***; + created new library project libfoo in $~/libfoo/ + EOE + + $build libfoo/ $config_c 2>>~%EOE% + %(version|c|ar|ld|def) .+%{11,12} + EOE + } + } + # Test create-from-existing functionality. # : exist -- cgit v1.1