aboutsummaryrefslogtreecommitdiff
path: root/tests/default-options/driver.cxx
diff options
context:
space:
mode:
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)
{