code: def test_error_duplicate():
      """Test that linking a single file from
      multiple sources causes a hard error."""
      t = BoostBuild.Tester()
  
      t.write(
          "jamroot.jam",
          """\
      import link ;
      link-directory dir1-link : src/dir1/include : <location>. ;
      link-directory dir2-link : src/dir2/include : <location>. ;
      """,
      )
  
      t.write("src/dir1/include/file1.h", "file1")
      t.write("src/dir2/include/file1.h", "file2")
  
      t.run_build_system(status=1)
      t.expect_output_lines(
          [
              "error: Cannot create link include/file1.h to src/dir2/include/file1.h.",
              "error: Link previously defined to another file, src/dir1/include/file1.h.",
          ]
      )
  
      t.cleanup()
  
file_path: turicreate/src/external/boost/boost_1_68_0/tools/build/test/link.py
imports: import BoostBuild
label_desc: Use image node_id 13 for calling a global function with example usage: test_error_duplicate() without return types