aboutsummaryrefslogtreecommitdiff
path: root/tests/new.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/new.test')
-rw-r--r--tests/new.test65
1 files changed, 40 insertions, 25 deletions
diff --git a/tests/new.test b/tests/new.test
index ee53668..ec45788 100644
--- a/tests/new.test
+++ b/tests/new.test
@@ -21,6 +21,7 @@ status += -d prj
test.arguments += --no-amalgamation
: exe
+ :
{
$* -t exe -l c++ prj-foo 2>>/"EOE" &prj-foo/***;
created new executable project prj-foo in $~/prj-foo/
@@ -31,51 +32,58 @@ status += -d prj
EOE
}
- : exe-c
+ : lib
+ :
{
- $* -t exe -l c prj-foo 2>>/"EOE" &prj-foo/***;
- created new executable project prj-foo in $~/prj-foo/
+ $* -t lib -l c++ libprj-foo 2>>/"EOE" &libprj-foo/***;
+ created new library project libprj-foo in $~/libprj-foo/
EOE
- $build prj-foo/ $c 2>>~%EOE%
- %(c|ld) .+%{2}
+ $build libprj-foo/ $cxx 2>>~%EOE%
+ %(version\.in|c\+\+|ar|ld) .+%{7}
EOE
}
- : lib
+ : exe-unit-tests
+ :
{
- $* -t lib -l c++ libprj-foo 2>>/"EOE" &libprj-foo/***;
- created new library project libprj-foo in $~/libprj-foo/
+ $* -t exe,unit-tests -l c++ foo 2>>/"EOE" &foo/***;
+ created new executable project foo in $~/foo/
EOE
- $build libprj-foo/ $cxx 2>>~%EOE%
- %(version\.in|c\+\+|ar|ld) .+%{7}
+ $build foo/ $cxx 2>>~%EOE%
+ %(c\+\+|ld|ar) .+%{5}
EOE
}
- : lib-c
+ : lib-unit-tests
+ :
{
- $* -t lib -l c libprj-foo 2>>/"EOE" &libprj-foo/***;
- created new library project libprj-foo in $~/libprj-foo/
+ $* -t lib,unit-tests -l c++ libfoo 2>>/"EOE" &libfoo/***;
+ created new library project libfoo in $~/libfoo/
EOE
- $build libprj-foo/ $c 2>>~%EOE%
- %(version\.in|c|ar|ld) .+%{7}
+ $build libfoo/ $cxx 2>>~%EOE%
+ %(version\.in|c\+\+|ar|ld) .+%{11}
EOE
}
- : exe-unit-tests
+ # C versions of the above.
+ #
+ : exe-c
+ :
{
- $* -t exe,unit-tests -l c++ foo 2>>/"EOE" &foo/***;
- created new executable project foo in $~/foo/
+ $* -t exe -l c prj-foo 2>>/"EOE" &prj-foo/***;
+ created new executable project prj-foo in $~/prj-foo/
EOE
- $build foo/ $cxx 2>>~%EOE%
- %(c\+\+|ld|ar) .+%{5}
+ $build prj-foo/ $c 2>>~%EOE%
+ %(c|ld) .+%{2}
EOE
}
: exe-c-unit-tests
+ :
{
$* -t exe,unit-tests -l c foo 2>>/"EOE" &foo/***;
created new executable project foo in $~/foo/
@@ -86,18 +94,25 @@ status += -d prj
EOE
}
- : lib-unit-tests
+ # Our C tests use fmemopen() which is not always available.
+ #
+
+ : lib-c
+ :
+ if ($c.target.class != 'windows' && $c.target.class != 'macos')
{
- $* -t lib,unit-tests -l c++ libfoo 2>>/"EOE" &libfoo/***;
- created new library project libfoo in $~/libfoo/
+ $* -t lib -l c libprj-foo 2>>/"EOE" &libprj-foo/***;
+ created new library project libprj-foo in $~/libprj-foo/
EOE
- $build libfoo/ $cxx 2>>~%EOE%
- %(version\.in|c\+\+|ar|ld) .+%{11}
+ $build libprj-foo/ $c 2>>~%EOE%
+ %(version\.in|c|ar|ld) .+%{7}
EOE
}
: lib-c-unit-tests
+ :
+ if ($c.target.class != 'windows' && $c.target.class != 'macos')
{
$* -t lib,unit-tests -l c libfoo 2>>/"EOE" &libfoo/***;
created new library project libfoo in $~/libfoo/