diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2021-08-05 19:36:34 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2021-08-06 11:39:14 +0300 |
commit | 7ebd5f9f540e907de06d8fdc76d95ccacabbbe1f (patch) | |
tree | 2069a221f6f8a7bc2ec8619f8a9d9ec25064dd74 /tests/default-options/testscript | |
parent | 1cdb233cedd12069a4aa5d761e20b42e842ec58f (diff) |
Add support for option positions to load_default_options()
Diffstat (limited to 'tests/default-options/testscript')
-rw-r--r-- | tests/default-options/testscript | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/tests/default-options/testscript b/tests/default-options/testscript index 09bb2ec..f071701 100644 --- a/tests/default-options/testscript +++ b/tests/default-options/testscript @@ -51,6 +51,7 @@ +mkdir -p $d/local/ +echo '--package-foo' >=$d/foo + +echo '--package-fox' >+$d/foo +echo '--package-bar' >=$d/bar +echo '--package-local-foo' >=$d/local/foo +echo '--package-local-bar' >=$d/local/bar @@ -78,7 +79,7 @@ %\.+/home/work/project/.build2/bar,--project-bar,true% %\.+/home/work/project/.build2/local/foo,--project-local-foo,true% %\.+/home/work/project/.build2/local/bar,--project-local-bar,true% - %\.+/home/work/project/package/.build2/foo,--package-foo,true% + %\.+/home/work/project/package/.build2/foo,--package-foo --package-fox,true% %\.+/home/work/project/package/.build2/bar,--package-bar,true% %\.+/home/work/project/package/.build2/local/foo,--package-local-foo,true% %\.+/home/work/project/package/.build2/local/bar,--package-local-bar,true% @@ -129,6 +130,7 @@ --project-local-foo --project-local-bar --package-foo + --package-fox --package-bar --package-local-foo --package-local-bar @@ -150,6 +152,26 @@ %overwriting remote \.+/home/work/project/package/.build2/local/baz% %overwriting remote \.+/home/work/project/package/.build2/local/foo% EOE + + : positions + : + { + : success + : + $* -f foo -f bar -d $start_dir -m 36 -l 2 >! + + : fail-file + : + $* -f foo -f bar -d $start_dir -m 36 -l 1 2>>/~%EOE% != 0 + %error: unable to load default options files: too many options in file .+/package/\.build2/foo% + EOE + + : fail-globally + : + $* -f foo -f bar -d $start_dir -m 100 -l 10 2>>EOE != 0 + error: unable to load default options files: too many options files + EOE + } } : args |