aboutsummaryrefslogtreecommitdiff
path: root/tests/new.testscript
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-05-15 13:59:41 +0300
committerBoris Kolpackov <boris@codesynthesis.com>2019-05-16 15:36:35 +0200
commit7cc6a852a24914253f6fa158b30fd250915c128b (patch)
treeefd867fd1bd03ef67ab912ad6a58eef408dc971d /tests/new.testscript
parent15beec8cf83c7d479c50f7bfbc9e05e1803686cc (diff)
Make bdep-new add README.md template
Can suppressed with the new no-readme --type suboption.
Diffstat (limited to 'tests/new.testscript')
-rw-r--r--tests/new.testscript52
1 files changed, 52 insertions, 0 deletions
diff --git a/tests/new.testscript b/tests/new.testscript
index 17f26a7..8a6ff65 100644
--- a/tests/new.testscript
+++ b/tests/new.testscript
@@ -98,6 +98,50 @@ status += -d prj
EOE
}
+ : exe-readme
+ :
+ {
+ : add
+ :
+ {
+ $* foo 2>>/"EOE" &foo/***;
+ created new executable project foo in $~/foo/
+ EOE
+
+ test -f foo/README.md;
+
+ cat foo/manifest >>~%EOE%;
+ %.+
+ description-file: README.md
+ %.+
+ EOE
+
+ cat foo/buildfile >>~%EOE%;
+ %.*
+ %.+ doc\{README.md\}.*%
+ %.*
+ EOE
+
+ $build foo/ $cxx 2>>~%EOE%
+ %(c\+\+|ld) .+%{2}
+ EOE
+ }
+
+ : omit
+ :
+ {
+ $* -t exe,no-readme foo 2>>/"EOE" &foo/***;
+ created new executable project foo in $~/foo/
+ EOE
+
+ test -f foo/README.md == 1;
+
+ $build foo/ $cxx 2>>~%EOE%
+ %(c\+\+|ld) .+%{2}
+ EOE
+ }
+ }
+
: lib-no-version
:
{
@@ -198,6 +242,10 @@ status += -d prj
created new empty project prj in $~/prj/
EOE
+ # While at it, test that README.md is created.
+ #
+ test -f prj/README.md;
+
$* --package -t lib libprj -d prj 2>>/"EOE";
created new library package libprj in $~/prj/libprj/
EOE
@@ -252,6 +300,10 @@ status += -d prj
created new library source subdirectory libprj in $~/prj/libprj/
EOE
+ # While at it, test that README.md is not created.
+ #
+ test -f prj/libprj/README.md == 1;
+
$build prj/ $cxx 2>>~%EOE%
%(c\+\+|ar|ld) .+%{6}
EOE