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

Function test_error_duplicate

test/link.py:305–324  ·  view source on GitHub ↗

Test that linking a single file from multiple sources causes a hard error.

()

Source from the content-addressed store, hash-verified

303 test_update_file_link(arg1, arg2)
304
305def test_error_duplicate():
306 """Test that linking a single file from
307 multiple sources causes a hard error."""
308 t = BoostBuild.Tester()
309
310 t.write("jamroot.jam", """\
311 import link ;
312 link-directory dir1-link : src/dir1/include : <location>. ;
313 link-directory dir2-link : src/dir2/include : <location>. ;
314 """)
315
316 t.write("src/dir1/include/file1.h", "file1")
317 t.write("src/dir2/include/file1.h", "file2")
318
319 t.run_build_system(status=1)
320 t.expect_output_lines(
321 ["error: Cannot create link include/file1.h to src/dir2/include/file1.h.",
322 "error: Link previously defined to another file, src/dir1/include/file1.h."])
323
324 t.cleanup()
325
326test_basic()
327test_merge_two()

Callers 1

link.pyFile · 0.85

Calls 4

writeMethod · 0.95
run_build_systemMethod · 0.95
expect_output_linesMethod · 0.95
cleanupMethod · 0.95

Tested by

no test coverage detected