diff options
Diffstat (limited to 'tests/b-info')
-rw-r--r-- | tests/b-info/driver.cxx | 54 | ||||
-rw-r--r-- | tests/b-info/testscript | 4 |
2 files changed, 30 insertions, 28 deletions
diff --git a/tests/b-info/driver.cxx b/tests/b-info/driver.cxx index 3ecfbc0..5691221 100644 --- a/tests/b-info/driver.cxx +++ b/tests/b-info/driver.cxx @@ -1,28 +1,15 @@ // file : tests/b-info/driver.cxx -*- C++ -*- // license : MIT; see accompanying LICENSE file -#include <cassert> - -#ifndef __cpp_lib_modules_ts #include <string> #include <iostream> -#endif - -// Other includes. - -#ifdef __cpp_modules_ts -#ifdef __cpp_lib_modules_ts -import std.core; -import std.io; -#endif -import butl.b; -import butl.path; -import butl.utility; // operator<<(ostream,exception) -#else -#include <libbutl/b.mxx> -#include <libbutl/path.mxx> -#include <libbutl/utility.mxx> -#endif + +#include <libbutl/b.hxx> +#include <libbutl/path.hxx> +#include <libbutl/utility.hxx> // operator<<(ostream,exception) + +#undef NDEBUG +#include <cassert> using namespace std; using namespace butl; @@ -62,13 +49,14 @@ try cout.exceptions (ios::failbit | ios::badbit); - b_project_info pi (b_info (project, - true /* ext_mods */, - 1 /* verb */, - {} /* cmd_callback */, - b, - {} /* search_fallback */, - {"--no-default-options"})); + b_project_info pi ( + b_info (project, + b_info_flags::ext_mods | b_info_flags::subprojects, + 1 /* verb */, + {} /* cmd_callback */, + b, + {} /* search_fallback */, + {"--no-default-options"})); cout << "project: " << pi.project << endl << "version: " << pi.version << endl @@ -110,6 +98,18 @@ try cout << *i; } + cout << endl + << "modules: "; + + for (auto b (pi.modules.begin ()), i (b); + i != pi.modules.end (); + ++i) + { + if (i != b) + cout << ' '; + + cout << *i; + } cout << endl; return 0; diff --git a/tests/b-info/testscript b/tests/b-info/testscript index c5c3910..1ebf060 100644 --- a/tests/b-info/testscript +++ b/tests/b-info/testscript @@ -57,10 +57,11 @@ test.options += -b $recall($build.path) url:$sp %src_root: .+/prj/% %out_root: .+/prj/% - amalgamation: ../../../../ + %amalgamation: .*% subprojects: @subprj/ operations: update clean meta-operations: perform configure disfigure dist info + modules: version config dist EOO $* prj/subprj >>/~"%EOO%" @@ -74,6 +75,7 @@ test.options += -b $recall($build.path) subprojects:$sp operations: update clean meta-operations: perform configure disfigure dist info + modules: config dist EOO } |