Test that 'glob-tree' works.
()
| 99 | |
| 100 | |
| 101 | def 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", """\ |
| 111 | project : source-location src ; |
| 112 | exe a : [ glob-tree *.cpp : bad* ] ../d2/d//l ; |
| 113 | """) |
| 114 | t.write("d2/d/l.cpp", """\ |
| 115 | #if defined(_WIN32) |
| 116 | __declspec(dllexport) |
| 117 | void 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 | |
| 128 | def test_directory_names_in_glob_tree(): |
no test coverage detected