MCPcopy Create free account
hub / github.com/boostorg/build / test_glob_tree

Function test_glob_tree

v2/test/project_glob.py:101–125  ·  view source on GitHub ↗

Test that 'glob-tree' works.

()

Source from the content-addressed store, hash-verified

99
100
101def test_glob_tree():
102 """Test that 'glob-tree' works."""
103
104 t = BoostBuild.Tester(use_test_config=False)
105
106 t.write("jamroot.jam", "")
107 t.write("d1/src/foo/a.cpp", "void bar(); int main() { bar(); }\n")
108 t.write("d1/src/bar/b.cpp", "void bar() {}\n")
109 t.write("d1/src/bar/bad.cpp", "very bad non-compilable file\n")
110 t.write("d1/jamfile.jam", """\
111project : source-location src ;
112exe a : [ glob-tree *.cpp : bad* ] ../d2/d//l ;
113""")
114 t.write("d2/d/l.cpp", """\
115#if defined(_WIN32)
116__declspec(dllexport)
117void force_import_lib_creation() {}
118#endif
119""")
120 t.write("d2/d/jamfile.jam", "lib l : [ glob *.cpp ] ;")
121
122 t.run_build_system(subdir="d1")
123 t.expect_addition("d1/bin/$toolset/debug/a.exe")
124
125 t.cleanup()
126
127
128def test_directory_names_in_glob_tree():

Callers 1

project_glob.pyFile · 0.85

Calls 4

writeMethod · 0.95
run_build_systemMethod · 0.95
expect_additionMethod · 0.95
cleanupMethod · 0.95

Tested by

no test coverage detected