diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/new.testscript | 85 | ||||
-rw-r--r-- | tests/release.testscript | 6 |
2 files changed, 88 insertions, 3 deletions
diff --git a/tests/new.testscript b/tests/new.testscript index 8b63103..a55ef0b 100644 --- a/tests/new.testscript +++ b/tests/new.testscript @@ -28,11 +28,43 @@ status += -d prj created new executable project prj-foo in $~/prj-foo/ EOE + sed -n -e 's/^(type: .+)$/\1/p' prj-foo/manifest >:''; + sed -n -e 's/^language: (.+)$/\1/p' prj-foo/manifest >'c++'; + $build prj-foo/ $config_cxx 2>>~%EOE% %(c\+\+|ld) .+%{2} EOE } + : exe-lib-prefix + : + { + $* -t exe -l c++ libprj-foo 2>>/"EOE" &libprj-foo/***; + warning: executable name starts with 'lib' + created new executable project libprj-foo in $~/libprj-foo/ + EOE + + sed -n -e 's/^type: (.+)$/\1/p' libprj-foo/manifest >'exe'; + + $build libprj-foo/ $config_cxx 2>>~%EOE% + %(c\+\+|ld) .+%{2} + EOE + } + + : exe-c++-suffix + : + { + $* -t exe -l c++ foo.c++ 2>>/"EOE" &foo.c++/***; + created new executable project foo.c++ in $~/foo.c++/ + EOE + + sed -n -e 's/^(language: .+)$/\1/p' foo.c++/manifest >:''; + + $build foo.c++/ $config_cxx 2>>~%EOE% + %(c\+\+|ld) .+%{2} + EOE + } + : exe-c++-c : { @@ -40,6 +72,11 @@ status += -d prj created new executable project foo in $~/foo/ EOE + sed -n -e 's/^language: (.+)$/\1/p' foo/manifest >>EOO; + c++ + c + EOO + touch foo/foo/bar.h; cat <<EOI >=foo/foo/bar.c; @@ -59,11 +96,28 @@ status += -d prj created new library project libprj-foo in $~/libprj-foo/ EOE + sed -n -e 's/^(type: .+)$/\1/p' libprj-foo/manifest >:''; + $build libprj-foo/ $config_cxx 2>>~%EOE% %(version|c\+\+|ar|ld) .+%{7} EOE } + : lib-no-lib-prefix + : + { + $* -t lib -l c++ prj-foo 2>>/"EOE" &prj-foo/***; + warning: library name does not start with 'lib' + created new library project prj-foo in $~/prj-foo/ + EOE + + sed -n -e 's/^type: (.+)$/\1/p' prj-foo/manifest >'lib'; + + $build prj-foo/ $config_cxx 2>>~%EOE% + %(version|c\+\+|ar|ld) .+%{7} + EOE + } + : lib-c++-c : { @@ -90,6 +144,16 @@ status += -d prj EOE } + : bare + : + { + $* -t bare prj 2>>/"EOE" &prj/***; + created new bare project prj in $~/prj/ + EOE + + sed -n -e 's/^type: (.+)$/\1/p' prj/manifest >'other' + } + : exe-prefix : { @@ -403,11 +467,27 @@ status += -d prj created new executable project prj-foo in $~/prj-foo/ EOE + sed -n -e 's/^language: (.+)$/\1/p' prj-foo/manifest >'c'; + $build prj-foo/ $config_c 2>>~%EOE% %(c|ld) .+%{2} EOE } + : exe-c-suffix + : + { + $* -t exe -l c foo.c 2>>/"EOE" &foo.c/***; + created new executable project foo.c in $~/foo.c/ + EOE + + sed -n -e 's/^(language: .+)$/\1/p' foo.c/manifest >:''; + + $build foo.c/ $config_c 2>>~%EOE% + %(c|ld) .+%{2} + EOE + } + : exe-c-c++ : { @@ -415,6 +495,11 @@ status += -d prj created new executable project foo in $~/foo/ EOE + sed -n -e 's/^language: (.+)$/\1/p' foo/manifest >>EOO; + c + c++ + EOO + touch foo/foo/bar.hxx; cat <<EOI >=foo/foo/bar.cxx; diff --git a/tests/release.testscript b/tests/release.testscript index 60f55a6..1140161 100644 --- a/tests/release.testscript +++ b/tests/release.testscript @@ -88,7 +88,7 @@ log2 = [cmdline] $gp2 log '--pretty=format:"%d %s"' %.* name: prj version: 0.2.0-a.0.z - summary: prj C++ executable + language: c++ %.* EOO } @@ -1139,7 +1139,7 @@ log2 = [cmdline] $gp2 log '--pretty=format:"%d %s"' %.* name: prj version: 0.2.0-a.0.z - summary: prj C++ executable + language: c++ %.* EOO @@ -1147,7 +1147,7 @@ log2 = [cmdline] $gp2 log '--pretty=format:"%d %s"' %.* name: libprj version: 0.2.0-a.0.z - project: prj + language: c++ %.* EOO } |