diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-08-12 14:56:03 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2019-08-13 16:52:16 +0300 |
commit | edab35e216bc3839915129e54f98160428634283 (patch) | |
tree | 51c1ae471e39aca817038f16d33cc25be4998369 /tests | |
parent | 54c937f78562fc6a5d2ea01c8747c62ccea980cb (diff) |
Add support for default options files
Diffstat (limited to 'tests')
-rw-r--r-- | tests/new.testscript | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/new.testscript b/tests/new.testscript index 161fda1..9ac0b9f 100644 --- a/tests/new.testscript +++ b/tests/new.testscript @@ -701,6 +701,47 @@ status += -d prj } } + : default-options-files + : + { + : remote-post-hook + : + if $posix + { + $* -t empty prj 2>! &prj/***; + + mkdir prj/.build2; + + cat <<EOI >=prj/.build2/bdep-new-package.options; + --post-hook "echo .idea/ >>.gitignore" + EOI + + $* --package -t lib -d prj libprj <'y' 2>>~%EOE%; + remote post-creation hooks: + % .+/.build2/bdep-new-package.options: echo .idea/ >>.gitignore% + %execute\? \[y/n\] created new library package libprj in .+/prj/libprj/% + EOE + + $build prj/libprj/ $cxx 2>>~%EOE% + %(version\.in|c\+\+|ar|ld) .+%{7} + EOE + } + + : disallow-options + : + { + mkdir .build2; + + cat <<EOI >=.build2/bdep-new.options; + --package + EOI + + $* prj 2>>/~%EOE%d != 0 + %\.+/.build2/bdep-new.options: error: --package in default options file% + EOE + } + } + : post-hook : if $posix |