aboutsummaryrefslogtreecommitdiff
path: root/tests/default-options/driver.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-08-21 18:55:27 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-08-22 10:37:06 +0300
commit20615c2161fb491e4c87b0cc8483c2e600ae6f79 (patch)
tree56eab64fc3499e8c28d32de59feb08efe9cd4da0 /tests/default-options/driver.cxx
parent375c7c9770c5407af33058170d13d9801a508b30 (diff)
Add extra_dir parameter for load_default_options()
Diffstat (limited to 'tests/default-options/driver.cxx')
-rw-r--r--tests/default-options/driver.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/default-options/driver.cxx b/tests/default-options/driver.cxx
index 106f70f..764ab44 100644
--- a/tests/default-options/driver.cxx
+++ b/tests/default-options/driver.cxx
@@ -35,7 +35,7 @@ using namespace std;
using namespace butl;
// Usage: argv[0] [-f <file>] [-d <start-dir>] [-s <sys-dir>] [-h <home-dir>]
-// [-e] <cmd-options>
+// [-x <extra-dir>] [-e] [-t] <cmd-options>
//
// Parse default options files, merge them with the command line options, and
// print the resulting options to STDOUT one per line. Note that the options
@@ -55,6 +55,9 @@ using namespace butl;
// -h
// Home directory.
//
+// -x
+// Extra directory.
+//
// -e
// Print the default options entries (rather than the merged options) to
// STDOUT one per line in the following format:
@@ -129,6 +132,7 @@ main (int argc, const char* argv[])
default_options_files fs;
optional<dir_path> sys_dir;
optional<dir_path> home_dir;
+ optional<dir_path> extra_dir;
vector<dir_path> dirs;
options cmd_ops;
bool print_entries (false);
@@ -158,6 +162,11 @@ main (int argc, const char* argv[])
assert (++i != argc);
home_dir = dir_path (argv[i]);
}
+ else if (op == "-x")
+ {
+ assert (++i != argc);
+ extra_dir = dir_path (argv[i]);
+ }
else if (op == "-e")
{
print_entries = true;
@@ -180,6 +189,7 @@ main (int argc, const char* argv[])
load_default_options<options, scanner, unknow_mode> (
sys_dir,
home_dir,
+ extra_dir,
fs,
[trace] (const path& f, bool remote, bool overwrite)
{