From 20615c2161fb491e4c87b0cc8483c2e600ae6f79 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 21 Aug 2019 18:55:27 +0300 Subject: Add extra_dir parameter for load_default_options() --- tests/default-options/driver.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tests/default-options/driver.cxx') 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 ] [-d ] [-s ] [-h ] -// [-e] +// [-x ] [-e] [-t] // // 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 sys_dir; optional home_dir; + optional extra_dir; vector 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 ( sys_dir, home_dir, + extra_dir, fs, [trace] (const path& f, bool remote, bool overwrite) { -- cgit v1.1