aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2023-10-03 18:58:46 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2023-10-04 16:52:36 +0300
commit8af0f196574167976f514d215f7f726f848cd123 (patch)
tree33d142e0d7ce910d4bdd487a3bbea636c9442ccc /tests
parentcfc3ca1bbb9ac617006a5af575676eeb6e520390 (diff)
Add support for no-symexport and auto-symexport sub-options for libraries in bdep-new
Diffstat (limited to 'tests')
-rw-r--r--tests/new.testscript148
1 files changed, 148 insertions, 0 deletions
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