Test that linking a single file from multiple sources causes a hard error.
()
| 303 | test_update_file_link(arg1, arg2) |
| 304 | |
| 305 | def 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 | |
| 326 | test_basic() |
| 327 | test_merge_two() |
no test coverage detected