summaryrefslogtreecommitdiff
path: root/tests/format/junctions
diff options
context:
space:
mode:
Diffstat (limited to 'tests/format/junctions')
-rw-r--r--tests/format/junctions/bar/app.bst7
-rw-r--r--tests/format/junctions/bar/bar.txt1
-rw-r--r--tests/format/junctions/bar/target.bst5
-rw-r--r--tests/format/junctions/circular-references/link-subsubsubproject.bst4
-rw-r--r--tests/format/junctions/circular-references/project.conf (renamed from tests/format/junctions/bar/project.conf)2
-rw-r--r--tests/format/junctions/circular-references/subproject-overriden-with-circular-reference-link.bst8
-rw-r--r--tests/format/junctions/circular-references/subproject-overriden-with-circular-reference.bst8
-rw-r--r--tests/format/junctions/circular-references/subproject.bst4
-rw-r--r--tests/format/junctions/circular-references/subproject/project.conf (renamed from tests/format/junctions/conflict/project.conf)2
-rw-r--r--tests/format/junctions/circular-references/subproject/sub.txt1
-rw-r--r--tests/format/junctions/circular-references/subproject/subsubproject.bst4
-rw-r--r--tests/format/junctions/circular-references/subproject/subsubproject/project.conf2
-rw-r--r--tests/format/junctions/circular-references/subproject/subsubproject/subsub.txt1
-rw-r--r--tests/format/junctions/circular-references/subproject/subsubproject/subsubsubproject.bst4
-rw-r--r--tests/format/junctions/circular-references/subproject/subsubproject/subsubsubproject/project.conf2
-rw-r--r--tests/format/junctions/circular-references/subproject/subsubproject/subsubsubproject/subsubsub.txt1
-rw-r--r--tests/format/junctions/circular-references/subproject/subsubproject/subsubsubproject/target.bst4
-rw-r--r--tests/format/junctions/circular-references/subproject/subsubproject/target.bst4
-rw-r--r--tests/format/junctions/circular-references/subproject/target.bst (renamed from tests/format/junctions/inconsistent-names/junctionA/junctionB/elements/base.bst)2
-rw-r--r--tests/format/junctions/circular-references/target-overridden-subsubproject-circular-link.bst4
-rw-r--r--tests/format/junctions/circular-references/target-overridden-subsubproject-circular.bst4
-rw-r--r--tests/format/junctions/conflict/target.bst6
-rw-r--r--tests/format/junctions/conflicts/include-conflict-target.bst5
-rw-r--r--tests/format/junctions/conflicts/include-conflict.bst7
-rw-r--r--tests/format/junctions/conflicts/nested-conflict-toplevel.bst4
-rw-r--r--tests/format/junctions/conflicts/override-conflict.bst8
-rw-r--r--tests/format/junctions/conflicts/plugin-conflict.bst4
-rw-r--r--tests/format/junctions/conflicts/project.conf2
-rw-r--r--tests/format/junctions/conflicts/simple-conflict.bst5
-rw-r--r--tests/format/junctions/conflicts/subproject-override-conflicting-path.bst13
-rw-r--r--tests/format/junctions/conflicts/subproject.bst4
-rw-r--r--tests/format/junctions/conflicts/subproject/project.conf2
-rw-r--r--tests/format/junctions/conflicts/subproject/sub.txt1
-rw-r--r--tests/format/junctions/conflicts/subproject/subsubproject-conflict-target.bst4
-rw-r--r--tests/format/junctions/conflicts/subproject/subsubproject-conflict.bst4
-rw-r--r--tests/format/junctions/conflicts/subproject/subsubproject-conflict/deepsurprise.txt1
-rw-r--r--tests/format/junctions/conflicts/subproject/subsubproject-conflict/project.conf2
-rw-r--r--tests/format/junctions/conflicts/subproject/subsubproject-conflict/target.bst4
-rw-r--r--tests/format/junctions/conflicts/subproject/subsubproject.bst4
-rw-r--r--tests/format/junctions/conflicts/subproject/subsubproject/project.conf2
-rw-r--r--tests/format/junctions/conflicts/subproject/subsubproject/subsub.txt1
-rw-r--r--tests/format/junctions/conflicts/subproject/subsubproject/subsubsubproject.bst4
-rw-r--r--tests/format/junctions/conflicts/subproject/subsubproject/subsubsubproject/project.conf2
-rw-r--r--tests/format/junctions/conflicts/subproject/subsubproject/subsubsubproject/subsubsub.txt1
-rw-r--r--tests/format/junctions/conflicts/subproject/subsubproject/subsubsubproject/target.bst4
-rw-r--r--tests/format/junctions/conflicts/subproject/subsubproject/target.bst4
-rw-r--r--tests/format/junctions/conflicts/subproject/target.bst4
-rw-r--r--tests/format/junctions/conflicts/subproject2.bst4
-rw-r--r--tests/format/junctions/conflicts/subproject2/inc.yaml1
-rw-r--r--tests/format/junctions/conflicts/subproject2/plugins/found.py19
-rw-r--r--tests/format/junctions/conflicts/subproject2/project.conf8
-rw-r--r--tests/format/junctions/conflicts/subproject2/sub2.txt1
-rw-r--r--tests/format/junctions/conflicts/subproject2/target.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-full-path/project.conf9
-rw-r--r--tests/format/junctions/duplicates-nested-full-path/subproject.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-full-path/subproject/project.conf2
-rw-r--r--tests/format/junctions/duplicates-nested-full-path/subproject/subproject1.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-full-path/subproject/subproject1/project.conf2
-rw-r--r--tests/format/junctions/duplicates-nested-full-path/subproject/subproject1/sub.txt1
-rw-r--r--tests/format/junctions/duplicates-nested-full-path/subproject/subproject1/target.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-full-path/subproject/subproject2.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-full-path/subproject/subproject2/project.conf2
-rw-r--r--tests/format/junctions/duplicates-nested-full-path/subproject/subproject2/sub2.txt1
-rw-r--r--tests/format/junctions/duplicates-nested-full-path/subproject/subproject2/target.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-full-path/subproject3.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-full-path/subproject3/project.conf2
-rw-r--r--tests/format/junctions/duplicates-nested-full-path/subproject3/sub3.txt1
-rw-r--r--tests/format/junctions/duplicates-nested-full-path/subproject3/target.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-full-path/target.bst6
-rw-r--r--tests/format/junctions/duplicates-nested-incomplete/project.conf7
-rw-r--r--tests/format/junctions/duplicates-nested-incomplete/subproject.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-incomplete/subproject/project.conf7
-rw-r--r--tests/format/junctions/duplicates-nested-incomplete/subproject/subproject1.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-incomplete/subproject/subproject1/project.conf2
-rw-r--r--tests/format/junctions/duplicates-nested-incomplete/subproject/subproject1/sub.txt1
-rw-r--r--tests/format/junctions/duplicates-nested-incomplete/subproject/subproject1/target.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-incomplete/subproject/subproject2.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-incomplete/subproject/subproject2/project.conf2
-rw-r--r--tests/format/junctions/duplicates-nested-incomplete/subproject/subproject2/sub2.txt1
-rw-r--r--tests/format/junctions/duplicates-nested-incomplete/subproject/subproject2/target.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-incomplete/subproject3.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-incomplete/subproject3/project.conf2
-rw-r--r--tests/format/junctions/duplicates-nested-incomplete/subproject3/sub3.txt1
-rw-r--r--tests/format/junctions/duplicates-nested-incomplete/subproject3/target.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-incomplete/target.bst6
-rw-r--r--tests/format/junctions/duplicates-nested-link1/project.conf8
-rw-r--r--tests/format/junctions/duplicates-nested-link1/subproject.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-link1/subproject/project.conf7
-rw-r--r--tests/format/junctions/duplicates-nested-link1/subproject/subproject1-link.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-link1/subproject/subproject1.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-link1/subproject/subproject1/project.conf2
-rw-r--r--tests/format/junctions/duplicates-nested-link1/subproject/subproject1/sub.txt1
-rw-r--r--tests/format/junctions/duplicates-nested-link1/subproject/subproject1/target.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-link1/subproject/subproject2.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-link1/subproject/subproject2/project.conf2
-rw-r--r--tests/format/junctions/duplicates-nested-link1/subproject/subproject2/sub2.txt1
-rw-r--r--tests/format/junctions/duplicates-nested-link1/subproject/subproject2/target.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-link1/subproject3.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-link1/subproject3/project.conf2
-rw-r--r--tests/format/junctions/duplicates-nested-link1/subproject3/sub3.txt1
-rw-r--r--tests/format/junctions/duplicates-nested-link1/subproject3/target.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-link1/target.bst6
-rw-r--r--tests/format/junctions/duplicates-nested-link2/project.conf7
-rw-r--r--tests/format/junctions/duplicates-nested-link2/subproject.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-link2/subproject/project.conf8
-rw-r--r--tests/format/junctions/duplicates-nested-link2/subproject/subproject1.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-link2/subproject/subproject1/project.conf2
-rw-r--r--tests/format/junctions/duplicates-nested-link2/subproject/subproject1/sub.txt1
-rw-r--r--tests/format/junctions/duplicates-nested-link2/subproject/subproject1/target.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-link2/subproject/subproject2.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-link2/subproject/subproject2/project.conf2
-rw-r--r--tests/format/junctions/duplicates-nested-link2/subproject/subproject2/sub2.txt1
-rw-r--r--tests/format/junctions/duplicates-nested-link2/subproject/subproject2/target.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-link2/subproject2-link.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-link2/subproject3.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-link2/subproject3/project.conf2
-rw-r--r--tests/format/junctions/duplicates-nested-link2/subproject3/sub3.txt1
-rw-r--r--tests/format/junctions/duplicates-nested-link2/subproject3/target.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-link2/target.bst6
-rw-r--r--tests/format/junctions/duplicates-nested-not-found/project.conf8
-rw-r--r--tests/format/junctions/duplicates-nested-not-found/subproject.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-not-found/subproject/project.conf7
-rw-r--r--tests/format/junctions/duplicates-nested-not-found/subproject/subproject1-link.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-not-found/subproject/subproject1.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-not-found/subproject/subproject1/project.conf2
-rw-r--r--tests/format/junctions/duplicates-nested-not-found/subproject/subproject1/sub.txt1
-rw-r--r--tests/format/junctions/duplicates-nested-not-found/subproject/subproject1/target.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-not-found/subproject/subproject2.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-not-found/subproject/subproject2/project.conf2
-rw-r--r--tests/format/junctions/duplicates-nested-not-found/subproject/subproject2/sub2.txt1
-rw-r--r--tests/format/junctions/duplicates-nested-not-found/subproject/subproject2/target.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-not-found/subproject3.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-not-found/subproject3/project.conf2
-rw-r--r--tests/format/junctions/duplicates-nested-not-found/subproject3/sub3.txt1
-rw-r--r--tests/format/junctions/duplicates-nested-not-found/subproject3/target.bst4
-rw-r--r--tests/format/junctions/duplicates-nested-not-found/target.bst6
-rw-r--r--tests/format/junctions/duplicates-nested/project.conf7
-rw-r--r--tests/format/junctions/duplicates-nested/subproject.bst4
-rw-r--r--tests/format/junctions/duplicates-nested/subproject/project.conf8
-rw-r--r--tests/format/junctions/duplicates-nested/subproject/subproject1.bst4
-rw-r--r--tests/format/junctions/duplicates-nested/subproject/subproject1/project.conf2
-rw-r--r--tests/format/junctions/duplicates-nested/subproject/subproject1/sub.txt1
-rw-r--r--tests/format/junctions/duplicates-nested/subproject/subproject1/target.bst4
-rw-r--r--tests/format/junctions/duplicates-nested/subproject/subproject2.bst4
-rw-r--r--tests/format/junctions/duplicates-nested/subproject/subproject2/project.conf2
-rw-r--r--tests/format/junctions/duplicates-nested/subproject/subproject2/sub2.txt1
-rw-r--r--tests/format/junctions/duplicates-nested/subproject/subproject2/target.bst4
-rw-r--r--tests/format/junctions/duplicates-nested/subproject3.bst4
-rw-r--r--tests/format/junctions/duplicates-nested/subproject3/project.conf2
-rw-r--r--tests/format/junctions/duplicates-nested/subproject3/sub3.txt1
-rw-r--r--tests/format/junctions/duplicates-nested/subproject3/target.bst4
-rw-r--r--tests/format/junctions/duplicates-nested/target.bst6
-rw-r--r--tests/format/junctions/duplicates-override-dup/project.conf2
-rw-r--r--tests/format/junctions/duplicates-override-dup/subproject.bst8
-rw-r--r--tests/format/junctions/duplicates-override-dup/subproject/project.conf8
-rw-r--r--tests/format/junctions/duplicates-override-dup/subproject/subproject1.bst4
-rw-r--r--tests/format/junctions/duplicates-override-dup/subproject/subproject1/project.conf2
-rw-r--r--tests/format/junctions/duplicates-override-dup/subproject/subproject1/sub.txt1
-rw-r--r--tests/format/junctions/duplicates-override-dup/subproject/subproject1/target.bst4
-rw-r--r--tests/format/junctions/duplicates-override-dup/subproject/subproject2.bst4
-rw-r--r--tests/format/junctions/duplicates-override-dup/subproject/subproject2/project.conf2
-rw-r--r--tests/format/junctions/duplicates-override-dup/subproject/subproject2/sub2.txt1
-rw-r--r--tests/format/junctions/duplicates-override-dup/subproject/subproject2/target.bst4
-rw-r--r--tests/format/junctions/duplicates-override-dup/subproject3.bst4
-rw-r--r--tests/format/junctions/duplicates-override-dup/subproject3/project.conf2
-rw-r--r--tests/format/junctions/duplicates-override-dup/subproject3/sub3.txt1
-rw-r--r--tests/format/junctions/duplicates-override-dup/subproject3/target.bst4
-rw-r--r--tests/format/junctions/duplicates-override-dup/target.bst5
-rw-r--r--tests/format/junctions/duplicates-override-twice-link/duplicate.bst4
-rw-r--r--tests/format/junctions/duplicates-override-twice-link/duplicate/duplicate.txt1
-rw-r--r--tests/format/junctions/duplicates-override-twice-link/duplicate/project.conf2
-rw-r--r--tests/format/junctions/duplicates-override-twice-link/duplicate/target.bst4
-rw-r--r--tests/format/junctions/duplicates-override-twice-link/override.bst (renamed from tests/format/junctions/conflict/foo.bst)2
-rw-r--r--tests/format/junctions/duplicates-override-twice-link/override/overridden-again.txt1
-rw-r--r--tests/format/junctions/duplicates-override-twice-link/override/project.conf2
-rw-r--r--tests/format/junctions/duplicates-override-twice-link/override/target.bst4
-rw-r--r--tests/format/junctions/duplicates-override-twice-link/project.conf7
-rw-r--r--tests/format/junctions/duplicates-override-twice-link/subproject.bst8
-rw-r--r--tests/format/junctions/duplicates-override-twice-link/subproject/override.bst (renamed from tests/format/junctions/foo/base.bst)2
-rw-r--r--tests/format/junctions/duplicates-override-twice-link/subproject/override/overridden.txt1
-rw-r--r--tests/format/junctions/duplicates-override-twice-link/subproject/override/project.conf2
-rw-r--r--tests/format/junctions/duplicates-override-twice-link/subproject/override/target.bst4
-rw-r--r--tests/format/junctions/duplicates-override-twice-link/subproject/project.conf7
-rw-r--r--tests/format/junctions/duplicates-override-twice-link/subproject/subsubproject.bst8
-rw-r--r--tests/format/junctions/duplicates-override-twice-link/subproject/subsubproject/project.conf2
-rw-r--r--tests/format/junctions/duplicates-override-twice-link/subproject/subsubproject/subsubsubproject.bst4
-rw-r--r--tests/format/junctions/duplicates-override-twice-link/subproject/subsubproject/subsubsubproject/original.txt1
-rw-r--r--tests/format/junctions/duplicates-override-twice-link/subproject/subsubproject/subsubsubproject/project.conf2
-rw-r--r--tests/format/junctions/duplicates-override-twice-link/subproject/subsubproject/subsubsubproject/target.bst4
-rw-r--r--tests/format/junctions/duplicates-override-twice-link/subproject/subsubsubproject-link.bst4
-rw-r--r--tests/format/junctions/duplicates-override-twice-link/target.bst5
-rw-r--r--tests/format/junctions/duplicates-simple-incomplete/project.conf7
-rw-r--r--tests/format/junctions/duplicates-simple-incomplete/subproject1.bst4
-rw-r--r--tests/format/junctions/duplicates-simple-incomplete/subproject1/project.conf2
-rw-r--r--tests/format/junctions/duplicates-simple-incomplete/subproject1/sub.txt1
-rw-r--r--tests/format/junctions/duplicates-simple-incomplete/subproject1/target.bst4
-rw-r--r--tests/format/junctions/duplicates-simple-incomplete/subproject2.bst4
-rw-r--r--tests/format/junctions/duplicates-simple-incomplete/subproject2/project.conf2
-rw-r--r--tests/format/junctions/duplicates-simple-incomplete/subproject2/sub2.txt1
-rw-r--r--tests/format/junctions/duplicates-simple-incomplete/subproject2/target.bst4
-rw-r--r--tests/format/junctions/duplicates-simple-incomplete/target.bst5
-rw-r--r--tests/format/junctions/duplicates-simple-link/project.conf8
-rw-r--r--tests/format/junctions/duplicates-simple-link/subproject1.bst4
-rw-r--r--tests/format/junctions/duplicates-simple-link/subproject1/project.conf2
-rw-r--r--tests/format/junctions/duplicates-simple-link/subproject1/sub.txt1
-rw-r--r--tests/format/junctions/duplicates-simple-link/subproject1/target.bst4
-rw-r--r--tests/format/junctions/duplicates-simple-link/subproject2-link.bst4
-rw-r--r--tests/format/junctions/duplicates-simple-link/subproject2.bst4
-rw-r--r--tests/format/junctions/duplicates-simple-link/subproject2/project.conf2
-rw-r--r--tests/format/junctions/duplicates-simple-link/subproject2/sub2.txt1
-rw-r--r--tests/format/junctions/duplicates-simple-link/subproject2/target.bst4
-rw-r--r--tests/format/junctions/duplicates-simple-link/target.bst5
-rw-r--r--tests/format/junctions/duplicates-simple-not-found/project.conf8
-rw-r--r--tests/format/junctions/duplicates-simple-not-found/subproject1.bst4
-rw-r--r--tests/format/junctions/duplicates-simple-not-found/subproject1/project.conf2
-rw-r--r--tests/format/junctions/duplicates-simple-not-found/subproject1/sub.txt1
-rw-r--r--tests/format/junctions/duplicates-simple-not-found/subproject1/target.bst4
-rw-r--r--tests/format/junctions/duplicates-simple-not-found/subproject2.bst4
-rw-r--r--tests/format/junctions/duplicates-simple-not-found/subproject2/project.conf2
-rw-r--r--tests/format/junctions/duplicates-simple-not-found/subproject2/sub2.txt1
-rw-r--r--tests/format/junctions/duplicates-simple-not-found/subproject2/target.bst4
-rw-r--r--tests/format/junctions/duplicates-simple-not-found/target.bst5
-rw-r--r--tests/format/junctions/duplicates-simple/project.conf8
-rw-r--r--tests/format/junctions/duplicates-simple/subproject1.bst4
-rw-r--r--tests/format/junctions/duplicates-simple/subproject1/project.conf2
-rw-r--r--tests/format/junctions/duplicates-simple/subproject1/sub.txt1
-rw-r--r--tests/format/junctions/duplicates-simple/subproject1/target.bst4
-rw-r--r--tests/format/junctions/duplicates-simple/subproject2.bst4
-rw-r--r--tests/format/junctions/duplicates-simple/subproject2/project.conf2
-rw-r--r--tests/format/junctions/duplicates-simple/subproject2/sub2.txt1
-rw-r--r--tests/format/junctions/duplicates-simple/subproject2/target.bst4
-rw-r--r--tests/format/junctions/duplicates-simple/target.bst5
-rw-r--r--tests/format/junctions/foo/app.bst7
-rw-r--r--tests/format/junctions/foo/foo.txt1
-rw-r--r--tests/format/junctions/full-path/element-full-path-notfound.bst3
-rw-r--r--tests/format/junctions/full-path/element-full-path.bst3
-rw-r--r--tests/format/junctions/full-path/junction-full-path-notfound.bst4
-rw-r--r--tests/format/junctions/full-path/junction-full-path.bst4
-rw-r--r--tests/format/junctions/full-path/project.conf2
-rw-r--r--tests/format/junctions/full-path/subproject.bst4
-rw-r--r--tests/format/junctions/full-path/subproject/project.conf2
-rw-r--r--tests/format/junctions/full-path/subproject/sub.txt1
-rw-r--r--tests/format/junctions/full-path/subproject/subsubproject.bst4
-rw-r--r--tests/format/junctions/full-path/subproject/subsubproject/project.conf2
-rw-r--r--tests/format/junctions/full-path/subproject/subsubproject/subsub.txt1
-rw-r--r--tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject.bst4
-rw-r--r--tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject/project.conf2
-rw-r--r--tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject/subsubsub.txt1
-rw-r--r--tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject/target.bst4
-rw-r--r--tests/format/junctions/full-path/subproject/subsubproject/target.bst4
-rw-r--r--tests/format/junctions/full-path/subproject/target.bst4
-rw-r--r--tests/format/junctions/inconsistent-names/elements/junction-A.bst4
-rw-r--r--tests/format/junctions/inconsistent-names/elements/junction-B-diff-name.bst4
-rw-r--r--tests/format/junctions/inconsistent-names/elements/target.bst9
-rw-r--r--tests/format/junctions/inconsistent-names/files/foo0
-rw-r--r--tests/format/junctions/inconsistent-names/junctionA/elements/app.bst6
-rw-r--r--tests/format/junctions/inconsistent-names/junctionA/elements/junction-B.bst4
-rw-r--r--tests/format/junctions/inconsistent-names/junctionA/elements/lib.bst7
-rw-r--r--tests/format/junctions/inconsistent-names/junctionA/files/app0
-rw-r--r--tests/format/junctions/inconsistent-names/junctionA/files/lib0
-rw-r--r--tests/format/junctions/inconsistent-names/junctionA/junctionB/base/baseimg0
-rw-r--r--tests/format/junctions/inconsistent-names/junctionA/junctionB/elements/lib2.bst6
-rw-r--r--tests/format/junctions/inconsistent-names/junctionA/junctionB/files/lib20
-rw-r--r--tests/format/junctions/inconsistent-names/junctionA/junctionB/project.conf8
-rw-r--r--tests/format/junctions/inconsistent-names/junctionA/project.conf8
-rw-r--r--tests/format/junctions/inconsistent-names/project.conf8
-rw-r--r--tests/format/junctions/internal-and-conflict/project.conf2
-rw-r--r--tests/format/junctions/internal-and-conflict/subproject.bst4
-rw-r--r--tests/format/junctions/internal-and-conflict/subproject/project.conf6
-rw-r--r--tests/format/junctions/internal-and-conflict/subproject/subsubproject.bst4
-rw-r--r--tests/format/junctions/internal-and-conflict/subproject/subsubproject/project.conf2
-rw-r--r--tests/format/junctions/internal-and-conflict/subproject/subsubproject/subsub.txt1
-rw-r--r--tests/format/junctions/internal-and-conflict/subproject/subsubproject/target.bst4
-rw-r--r--tests/format/junctions/internal-and-conflict/subproject/subtarget.bst10
-rw-r--r--tests/format/junctions/internal-and-conflict/subsubproject-again.bst4
-rw-r--r--tests/format/junctions/internal-and-conflict/subsubproject-again/project.conf2
-rw-r--r--tests/format/junctions/internal-and-conflict/subsubproject-again/subsub-again.txt1
-rw-r--r--tests/format/junctions/internal-and-conflict/subsubproject-again/target.bst4
-rw-r--r--tests/format/junctions/internal-and-conflict/subsubproject-conflict.bst4
-rw-r--r--tests/format/junctions/internal-and-conflict/subsubproject-conflict/project.conf2
-rw-r--r--tests/format/junctions/internal-and-conflict/subsubproject-conflict/subsub-again.txt1
-rw-r--r--tests/format/junctions/internal-and-conflict/subsubproject-conflict/target.bst4
-rw-r--r--tests/format/junctions/internal-and-conflict/target.bst6
-rw-r--r--tests/format/junctions/internal-double/project.conf2
-rw-r--r--tests/format/junctions/internal-double/subproject1.bst4
-rw-r--r--tests/format/junctions/internal-double/subproject1/project.conf6
-rw-r--r--tests/format/junctions/internal-double/subproject1/subsubproject.bst4
-rw-r--r--tests/format/junctions/internal-double/subproject1/subsubproject/project.conf2
-rw-r--r--tests/format/junctions/internal-double/subproject1/subsubproject/subsub1.txt1
-rw-r--r--tests/format/junctions/internal-double/subproject1/subsubproject/target.bst4
-rw-r--r--tests/format/junctions/internal-double/subproject1/subtarget.bst10
-rw-r--r--tests/format/junctions/internal-double/subproject2.bst4
-rw-r--r--tests/format/junctions/internal-double/subproject2/project.conf6
-rw-r--r--tests/format/junctions/internal-double/subproject2/subsubproject.bst4
-rw-r--r--tests/format/junctions/internal-double/subproject2/subsubproject/project.conf2
-rw-r--r--tests/format/junctions/internal-double/subproject2/subsubproject/subsub2.txt1
-rw-r--r--tests/format/junctions/internal-double/subproject2/subsubproject/target.bst4
-rw-r--r--tests/format/junctions/internal-double/subproject2/subtarget.bst10
-rw-r--r--tests/format/junctions/internal-double/subsubproject-again.bst4
-rw-r--r--tests/format/junctions/internal-double/subsubproject-again/project.conf2
-rw-r--r--tests/format/junctions/internal-double/subsubproject-again/subsub-again.txt1
-rw-r--r--tests/format/junctions/internal-double/subsubproject-again/target.bst4
-rw-r--r--tests/format/junctions/internal-double/target.bst6
-rw-r--r--tests/format/junctions/internal-link/project.conf2
-rw-r--r--tests/format/junctions/internal-link/subproject.bst4
-rw-r--r--tests/format/junctions/internal-link/subproject/project.conf6
-rw-r--r--tests/format/junctions/internal-link/subproject/subsubproject-link.bst4
-rw-r--r--tests/format/junctions/internal-link/subproject/subsubproject.bst4
-rw-r--r--tests/format/junctions/internal-link/subproject/subsubproject/project.conf2
-rw-r--r--tests/format/junctions/internal-link/subproject/subsubproject/subsub.txt1
-rw-r--r--tests/format/junctions/internal-link/subproject/subsubproject/target.bst4
-rw-r--r--tests/format/junctions/internal-link/subproject/subtarget.bst10
-rw-r--r--tests/format/junctions/internal-link/subsubproject-again.bst4
-rw-r--r--tests/format/junctions/internal-link/subsubproject-again/project.conf2
-rw-r--r--tests/format/junctions/internal-link/subsubproject-again/subsub-again.txt1
-rw-r--r--tests/format/junctions/internal-link/subsubproject-again/target.bst4
-rw-r--r--tests/format/junctions/internal-link/target.bst5
-rw-r--r--tests/format/junctions/internal-override/project.conf2
-rw-r--r--tests/format/junctions/internal-override/subproject.bst8
-rw-r--r--tests/format/junctions/internal-override/subproject/project.conf6
-rw-r--r--tests/format/junctions/internal-override/subproject/subsubproject.bst4
-rw-r--r--tests/format/junctions/internal-override/subproject/subsubproject/project.conf2
-rw-r--r--tests/format/junctions/internal-override/subproject/subsubproject/subsub.txt1
-rw-r--r--tests/format/junctions/internal-override/subproject/subsubproject/target.bst4
-rw-r--r--tests/format/junctions/internal-override/subproject/subtarget.bst10
-rw-r--r--tests/format/junctions/internal-override/subsubproject-again.bst4
-rw-r--r--tests/format/junctions/internal-override/subsubproject-again/project.conf2
-rw-r--r--tests/format/junctions/internal-override/subsubproject-again/subsub-again.txt1
-rw-r--r--tests/format/junctions/internal-override/subsubproject-again/target.bst4
-rw-r--r--tests/format/junctions/internal-override/subsubproject-override.bst4
-rw-r--r--tests/format/junctions/internal-override/subsubproject-override/project.conf2
-rw-r--r--tests/format/junctions/internal-override/subsubproject-override/subsub-override.txt1
-rw-r--r--tests/format/junctions/internal-override/subsubproject-override/target.bst4
-rw-r--r--tests/format/junctions/internal-override/target.bst5
-rw-r--r--tests/format/junctions/internal-simple/project.conf2
-rw-r--r--tests/format/junctions/internal-simple/subproject.bst4
-rw-r--r--tests/format/junctions/internal-simple/subproject/project.conf6
-rw-r--r--tests/format/junctions/internal-simple/subproject/subsubproject.bst4
-rw-r--r--tests/format/junctions/internal-simple/subproject/subsubproject/project.conf2
-rw-r--r--tests/format/junctions/internal-simple/subproject/subsubproject/subsub.txt1
-rw-r--r--tests/format/junctions/internal-simple/subproject/subsubproject/target.bst4
-rw-r--r--tests/format/junctions/internal-simple/subproject/subtarget.bst10
-rw-r--r--tests/format/junctions/internal-simple/subsubproject-again.bst4
-rw-r--r--tests/format/junctions/internal-simple/subsubproject-again/project.conf2
-rw-r--r--tests/format/junctions/internal-simple/subsubproject-again/subsub-again.txt1
-rw-r--r--tests/format/junctions/internal-simple/subsubproject-again/target.bst4
-rw-r--r--tests/format/junctions/internal-simple/target.bst5
-rw-r--r--tests/format/junctions/invalid/base/base.txt (renamed from tests/format/junctions/base/base.txt)0
-rw-r--r--tests/format/junctions/invalid/base/project.conf (renamed from tests/format/junctions/base/project.conf)0
-rw-r--r--tests/format/junctions/invalid/base/target.bst (renamed from tests/format/junctions/base/target.bst)0
-rw-r--r--tests/format/junctions/invalid/missing-element.bst9
-rw-r--r--tests/format/junctions/invalid/subproject-self-override.bst16
-rw-r--r--tests/format/junctions/invalid/target-self-override.bst4
-rw-r--r--tests/format/junctions/missing-element/bad-junction.bst (renamed from tests/format/junctions/invalid/missing.bst)0
-rw-r--r--tests/format/junctions/nested/deeptarget.bst6
-rw-r--r--tests/format/junctions/nested/foo.bst4
-rw-r--r--tests/format/junctions/nested/project.conf2
-rw-r--r--tests/format/junctions/nested/subproject.bst4
-rw-r--r--tests/format/junctions/nested/subproject/project.conf2
-rw-r--r--tests/format/junctions/nested/subproject/sub.txt1
-rw-r--r--tests/format/junctions/nested/subproject/subsubproject.bst4
-rw-r--r--tests/format/junctions/nested/subproject/subsubproject/project.conf2
-rw-r--r--tests/format/junctions/nested/subproject/subsubproject/subsub.txt1
-rw-r--r--tests/format/junctions/nested/subproject/subsubproject/subsubsubproject.bst4
-rw-r--r--tests/format/junctions/nested/subproject/subsubproject/subsubsubproject/project.conf2
-rw-r--r--tests/format/junctions/nested/subproject/subsubproject/subsubsubproject/subsubsub.txt1
-rw-r--r--tests/format/junctions/nested/subproject/subsubproject/subsubsubproject/target.bst4
-rw-r--r--tests/format/junctions/nested/subproject/subsubproject/subtarget.bst4
-rw-r--r--tests/format/junctions/nested/subproject/subsubproject/target.bst4
-rw-r--r--tests/format/junctions/nested/subproject/subsubtarget.bst4
-rw-r--r--tests/format/junctions/nested/subproject/subtarget.bst4
-rw-r--r--tests/format/junctions/nested/subproject/target.bst4
-rw-r--r--tests/format/junctions/nested/target.bst5
-rw-r--r--tests/format/junctions/options-default/project.conf2
-rw-r--r--tests/format/junctions/options-inherit/project.conf11
-rw-r--r--tests/format/junctions/options/base-default.bst (renamed from tests/format/junctions/options-default/base.bst)0
-rw-r--r--tests/format/junctions/options/base-explicit.bst (renamed from tests/format/junctions/options/base.bst)0
-rw-r--r--tests/format/junctions/options/base-propagate.bst (renamed from tests/format/junctions/options-inherit/base.bst)0
-rw-r--r--tests/format/junctions/options/options-base/horsy.txt (renamed from tests/format/junctions/options-base/horsy.txt)0
-rw-r--r--tests/format/junctions/options/options-base/pony.txt (renamed from tests/format/junctions/options-base/pony.txt)0
-rw-r--r--tests/format/junctions/options/options-base/project.conf (renamed from tests/format/junctions/options-base/project.conf)0
-rw-r--r--tests/format/junctions/options/options-base/target.bst (renamed from tests/format/junctions/options-base/target.bst)0
-rw-r--r--tests/format/junctions/options/target-default.bst (renamed from tests/format/junctions/options-inherit/target.bst)2
-rw-r--r--tests/format/junctions/options/target-explicit.bst (renamed from tests/format/junctions/options/target.bst)2
-rw-r--r--tests/format/junctions/options/target-propagate.bst (renamed from tests/format/junctions/foo/target.bst)3
-rw-r--r--tests/format/junctions/override-twice/override.bst (renamed from tests/format/junctions/bar/base.bst)2
-rw-r--r--tests/format/junctions/override-twice/override/overridden-again.txt1
-rw-r--r--tests/format/junctions/override-twice/override/project.conf2
-rw-r--r--tests/format/junctions/override-twice/override/target.bst4
-rw-r--r--tests/format/junctions/override-twice/project.conf2
-rw-r--r--tests/format/junctions/override-twice/subproject.bst8
-rw-r--r--tests/format/junctions/override-twice/subproject/override.bst (renamed from tests/format/junctions/conflict/bar.bst)2
-rw-r--r--tests/format/junctions/override-twice/subproject/override/overridden.txt1
-rw-r--r--tests/format/junctions/override-twice/subproject/override/project.conf2
-rw-r--r--tests/format/junctions/override-twice/subproject/override/target.bst4
-rw-r--r--tests/format/junctions/override-twice/subproject/project.conf2
-rw-r--r--tests/format/junctions/override-twice/subproject/subsubproject.bst8
-rw-r--r--tests/format/junctions/override-twice/subproject/subsubproject/project.conf2
-rw-r--r--tests/format/junctions/override-twice/subproject/subsubproject/subsubsubproject.bst4
-rw-r--r--tests/format/junctions/override-twice/subproject/subsubproject/subsubsubproject/original.txt1
-rw-r--r--tests/format/junctions/override-twice/subproject/subsubproject/subsubsubproject/project.conf2
-rw-r--r--tests/format/junctions/override-twice/subproject/subsubproject/subsubsubproject/target.bst4
-rw-r--r--tests/format/junctions/override-twice/target.bst4
-rw-r--r--tests/format/junctions/overrides/overridden-subsubproject.bst10
-rw-r--r--tests/format/junctions/overrides/overridden-subsubsubproject.bst10
-rw-r--r--tests/format/junctions/overrides/project.conf2
-rw-r--r--tests/format/junctions/overrides/subproject-overriden-with-deep-subproject.bst8
-rw-r--r--tests/format/junctions/overrides/subproject-with-deep-override.bst8
-rw-r--r--tests/format/junctions/overrides/subproject-with-override.bst8
-rw-r--r--tests/format/junctions/overrides/subproject.bst4
-rw-r--r--tests/format/junctions/overrides/subproject/project.conf2
-rw-r--r--tests/format/junctions/overrides/subproject/sub.txt1
-rw-r--r--tests/format/junctions/overrides/subproject/subsubproject.bst4
-rw-r--r--tests/format/junctions/overrides/subproject/subsubproject/project.conf2
-rw-r--r--tests/format/junctions/overrides/subproject/subsubproject/subsub.txt1
-rw-r--r--tests/format/junctions/overrides/subproject/subsubproject/subsubsubproject.bst4
-rw-r--r--tests/format/junctions/overrides/subproject/subsubproject/subsubsubproject/project.conf2
-rw-r--r--tests/format/junctions/overrides/subproject/subsubproject/subsubsubproject/subsubsub.txt1
-rw-r--r--tests/format/junctions/overrides/subproject/subsubproject/subsubsubproject/target.bst4
-rw-r--r--tests/format/junctions/overrides/subproject/subsubproject/target.bst4
-rw-r--r--tests/format/junctions/overrides/subproject/target.bst4
-rw-r--r--tests/format/junctions/overrides/surpriseproject.bst4
-rw-r--r--tests/format/junctions/overrides/surpriseproject/deepsurpriseproject.bst4
-rw-r--r--tests/format/junctions/overrides/surpriseproject/deepsurpriseproject/deepsurprise.txt1
-rw-r--r--tests/format/junctions/overrides/surpriseproject/deepsurpriseproject/project.conf2
-rw-r--r--tests/format/junctions/overrides/surpriseproject/deepsurpriseproject/target.bst4
-rw-r--r--tests/format/junctions/overrides/surpriseproject/project.conf2
-rw-r--r--tests/format/junctions/overrides/surpriseproject/surprise.txt1
-rw-r--r--tests/format/junctions/overrides/surpriseproject/target.bst4
-rw-r--r--tests/format/junctions/overrides/target-overridden-subsubproject.bst12
-rw-r--r--tests/format/junctions/overrides/target-overridden-subsubsubproject.bst8
-rw-r--r--tests/format/junctions/overrides/target-overridden-with-deepsubproject.bst4
-rw-r--r--tests/format/junctions/simple/project.conf2
-rw-r--r--tests/format/junctions/simple/subproject.bst4
-rw-r--r--tests/format/junctions/simple/subproject/base.txt1
-rw-r--r--tests/format/junctions/simple/subproject/project.conf2
-rw-r--r--tests/format/junctions/simple/subproject/target.bst4
-rw-r--r--tests/format/junctions/simple/target.bst4
-rw-r--r--tests/format/junctions/toplevel/bar.bst4
-rw-r--r--tests/format/junctions/toplevel/base.bst4
-rw-r--r--tests/format/junctions/toplevel/element-full-path-notfound.bst3
-rw-r--r--tests/format/junctions/toplevel/element-full-path.bst3
-rw-r--r--tests/format/junctions/toplevel/foo.bst4
-rw-r--r--tests/format/junctions/toplevel/junction-full-path-notfound.bst4
-rw-r--r--tests/format/junctions/toplevel/junction-full-path.bst4
-rw-r--r--tests/format/junctions/toplevel/project.conf2
-rw-r--r--tests/format/junctions/toplevel/target.bst6
-rw-r--r--tests/format/junctions/use-repo/baserepo/base.txt1
-rw-r--r--tests/format/junctions/use-repo/baserepo/project.conf2
-rw-r--r--tests/format/junctions/use-repo/baserepo/target.bst4
-rw-r--r--tests/format/junctions/use-repo/project.conf (renamed from tests/format/junctions/foo/project.conf)0
-rw-r--r--tests/format/junctions/use-repo/target.bst (renamed from tests/format/junctions/options-default/target.bst)0
452 files changed, 1461 insertions, 165 deletions
diff --git a/tests/format/junctions/bar/app.bst b/tests/format/junctions/bar/app.bst
deleted file mode 100644
index a1a7a0ed9..000000000
--- a/tests/format/junctions/bar/app.bst
+++ /dev/null
@@ -1,7 +0,0 @@
-kind: import
-sources:
-- kind: local
- path: bar.txt
-depends:
-- junction: base.bst
- filename: target.bst
diff --git a/tests/format/junctions/bar/bar.txt b/tests/format/junctions/bar/bar.txt
deleted file mode 100644
index 5716ca598..000000000
--- a/tests/format/junctions/bar/bar.txt
+++ /dev/null
@@ -1 +0,0 @@
-bar
diff --git a/tests/format/junctions/bar/target.bst b/tests/format/junctions/bar/target.bst
deleted file mode 100644
index 70b78a3fc..000000000
--- a/tests/format/junctions/bar/target.bst
+++ /dev/null
@@ -1,5 +0,0 @@
-kind: stack
-depends:
-- junction: base.bst
- filename: target.bst
-- app.bst
diff --git a/tests/format/junctions/circular-references/link-subsubsubproject.bst b/tests/format/junctions/circular-references/link-subsubsubproject.bst
new file mode 100644
index 000000000..b10db7740
--- /dev/null
+++ b/tests/format/junctions/circular-references/link-subsubsubproject.bst
@@ -0,0 +1,4 @@
+kind: link
+
+config:
+ target: subproject-overriden-with-circular-reference-link.bst:subsubproject.bst:subsubsubproject.bst
diff --git a/tests/format/junctions/bar/project.conf b/tests/format/junctions/circular-references/project.conf
index 42d288416..20636c446 100644
--- a/tests/format/junctions/bar/project.conf
+++ b/tests/format/junctions/circular-references/project.conf
@@ -1,2 +1,2 @@
-name: bar
+name: test
min-version: 2.0
diff --git a/tests/format/junctions/circular-references/subproject-overriden-with-circular-reference-link.bst b/tests/format/junctions/circular-references/subproject-overriden-with-circular-reference-link.bst
new file mode 100644
index 000000000..9d8b34111
--- /dev/null
+++ b/tests/format/junctions/circular-references/subproject-overriden-with-circular-reference-link.bst
@@ -0,0 +1,8 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject
+
+config:
+ overrides:
+ subsubproject.bst: link-subsubsubproject.bst
diff --git a/tests/format/junctions/circular-references/subproject-overriden-with-circular-reference.bst b/tests/format/junctions/circular-references/subproject-overriden-with-circular-reference.bst
new file mode 100644
index 000000000..1cdbc44a6
--- /dev/null
+++ b/tests/format/junctions/circular-references/subproject-overriden-with-circular-reference.bst
@@ -0,0 +1,8 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject
+
+config:
+ overrides:
+ subsubproject.bst: subproject-overriden-with-circular-reference.bst:subsubproject.bst:subsubsubproject.bst
diff --git a/tests/format/junctions/circular-references/subproject.bst b/tests/format/junctions/circular-references/subproject.bst
new file mode 100644
index 000000000..c88189cb0
--- /dev/null
+++ b/tests/format/junctions/circular-references/subproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject
diff --git a/tests/format/junctions/conflict/project.conf b/tests/format/junctions/circular-references/subproject/project.conf
index 660ab4fa2..39a53e2ab 100644
--- a/tests/format/junctions/conflict/project.conf
+++ b/tests/format/junctions/circular-references/subproject/project.conf
@@ -1,2 +1,2 @@
-name: conflict
+name: subtest
min-version: 2.0
diff --git a/tests/format/junctions/circular-references/subproject/sub.txt b/tests/format/junctions/circular-references/subproject/sub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/circular-references/subproject/sub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/circular-references/subproject/subsubproject.bst b/tests/format/junctions/circular-references/subproject/subsubproject.bst
new file mode 100644
index 000000000..f535ab0e0
--- /dev/null
+++ b/tests/format/junctions/circular-references/subproject/subsubproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subsubproject
diff --git a/tests/format/junctions/circular-references/subproject/subsubproject/project.conf b/tests/format/junctions/circular-references/subproject/subsubproject/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/circular-references/subproject/subsubproject/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/circular-references/subproject/subsubproject/subsub.txt b/tests/format/junctions/circular-references/subproject/subsubproject/subsub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/circular-references/subproject/subsubproject/subsub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/circular-references/subproject/subsubproject/subsubsubproject.bst b/tests/format/junctions/circular-references/subproject/subsubproject/subsubsubproject.bst
new file mode 100644
index 000000000..bce64597b
--- /dev/null
+++ b/tests/format/junctions/circular-references/subproject/subsubproject/subsubsubproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subsubsubproject
diff --git a/tests/format/junctions/circular-references/subproject/subsubproject/subsubsubproject/project.conf b/tests/format/junctions/circular-references/subproject/subsubproject/subsubsubproject/project.conf
new file mode 100644
index 000000000..e508da808
--- /dev/null
+++ b/tests/format/junctions/circular-references/subproject/subsubproject/subsubsubproject/project.conf
@@ -0,0 +1,2 @@
+name: subsubsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/circular-references/subproject/subsubproject/subsubsubproject/subsubsub.txt b/tests/format/junctions/circular-references/subproject/subsubproject/subsubsubproject/subsubsub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/circular-references/subproject/subsubproject/subsubsubproject/subsubsub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/circular-references/subproject/subsubproject/subsubsubproject/target.bst b/tests/format/junctions/circular-references/subproject/subsubproject/subsubsubproject/target.bst
new file mode 100644
index 000000000..351c9a22d
--- /dev/null
+++ b/tests/format/junctions/circular-references/subproject/subsubproject/subsubsubproject/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: subsubsub.txt
diff --git a/tests/format/junctions/circular-references/subproject/subsubproject/target.bst b/tests/format/junctions/circular-references/subproject/subsubproject/target.bst
new file mode 100644
index 000000000..afafac601
--- /dev/null
+++ b/tests/format/junctions/circular-references/subproject/subsubproject/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: subsub.txt
diff --git a/tests/format/junctions/inconsistent-names/junctionA/junctionB/elements/base.bst b/tests/format/junctions/circular-references/subproject/target.bst
index ecdc57c79..e24d9bbb4 100644
--- a/tests/format/junctions/inconsistent-names/junctionA/junctionB/elements/base.bst
+++ b/tests/format/junctions/circular-references/subproject/target.bst
@@ -1,4 +1,4 @@
kind: import
sources:
- kind: local
- path: base
+ path: sub.txt
diff --git a/tests/format/junctions/circular-references/target-overridden-subsubproject-circular-link.bst b/tests/format/junctions/circular-references/target-overridden-subsubproject-circular-link.bst
new file mode 100644
index 000000000..32617f620
--- /dev/null
+++ b/tests/format/junctions/circular-references/target-overridden-subsubproject-circular-link.bst
@@ -0,0 +1,4 @@
+kind: stack
+
+depends:
+- subproject-overriden-with-circular-reference-link.bst:subsubproject.bst:target.bst
diff --git a/tests/format/junctions/circular-references/target-overridden-subsubproject-circular.bst b/tests/format/junctions/circular-references/target-overridden-subsubproject-circular.bst
new file mode 100644
index 000000000..fd4b5a5f7
--- /dev/null
+++ b/tests/format/junctions/circular-references/target-overridden-subsubproject-circular.bst
@@ -0,0 +1,4 @@
+kind: stack
+
+depends:
+- subproject-overriden-with-circular-reference.bst:subsubproject.bst:target.bst
diff --git a/tests/format/junctions/conflict/target.bst b/tests/format/junctions/conflict/target.bst
deleted file mode 100644
index 5e280e542..000000000
--- a/tests/format/junctions/conflict/target.bst
+++ /dev/null
@@ -1,6 +0,0 @@
-kind: stack
-depends:
-- junction: foo.bst
- filename: target.bst
-- junction: bar.bst
- filename: target.bst
diff --git a/tests/format/junctions/conflicts/include-conflict-target.bst b/tests/format/junctions/conflicts/include-conflict-target.bst
new file mode 100644
index 000000000..237989cd7
--- /dev/null
+++ b/tests/format/junctions/conflicts/include-conflict-target.bst
@@ -0,0 +1,5 @@
+kind: stack
+
+depends:
+- include-conflict.bst
+- subproject.bst:target.bst
diff --git a/tests/format/junctions/conflicts/include-conflict.bst b/tests/format/junctions/conflicts/include-conflict.bst
new file mode 100644
index 000000000..9c1ecab25
--- /dev/null
+++ b/tests/format/junctions/conflicts/include-conflict.bst
@@ -0,0 +1,7 @@
+kind: manual
+
+variables:
+ (@): subproject2.bst:inc.yaml
+
+depends:
+- subproject2.bst:target.bst
diff --git a/tests/format/junctions/conflicts/nested-conflict-toplevel.bst b/tests/format/junctions/conflicts/nested-conflict-toplevel.bst
new file mode 100644
index 000000000..445ac0799
--- /dev/null
+++ b/tests/format/junctions/conflicts/nested-conflict-toplevel.bst
@@ -0,0 +1,4 @@
+kind: stack
+
+depends:
+- subproject.bst:subsubproject-conflict-target.bst
diff --git a/tests/format/junctions/conflicts/override-conflict.bst b/tests/format/junctions/conflicts/override-conflict.bst
new file mode 100644
index 000000000..3f0728d29
--- /dev/null
+++ b/tests/format/junctions/conflicts/override-conflict.bst
@@ -0,0 +1,8 @@
+kind: stack
+
+#
+# To trigger the conflict, we need to traverse the path of
+# the overridden `subsubproject.bst` junction.
+#
+depends:
+- subproject-override-conflicting-path.bst:subsubproject.bst:target.bst
diff --git a/tests/format/junctions/conflicts/plugin-conflict.bst b/tests/format/junctions/conflicts/plugin-conflict.bst
new file mode 100644
index 000000000..b9061d14b
--- /dev/null
+++ b/tests/format/junctions/conflicts/plugin-conflict.bst
@@ -0,0 +1,4 @@
+kind: found
+
+depends:
+- subproject.bst:target.bst
diff --git a/tests/format/junctions/conflicts/project.conf b/tests/format/junctions/conflicts/project.conf
new file mode 100644
index 000000000..20636c446
--- /dev/null
+++ b/tests/format/junctions/conflicts/project.conf
@@ -0,0 +1,2 @@
+name: test
+min-version: 2.0
diff --git a/tests/format/junctions/conflicts/simple-conflict.bst b/tests/format/junctions/conflicts/simple-conflict.bst
new file mode 100644
index 000000000..5aaf3a8ab
--- /dev/null
+++ b/tests/format/junctions/conflicts/simple-conflict.bst
@@ -0,0 +1,5 @@
+kind: stack
+
+depends:
+- subproject.bst:target.bst
+- subproject2.bst:target.bst
diff --git a/tests/format/junctions/conflicts/subproject-override-conflicting-path.bst b/tests/format/junctions/conflicts/subproject-override-conflicting-path.bst
new file mode 100644
index 000000000..3861d97df
--- /dev/null
+++ b/tests/format/junctions/conflicts/subproject-override-conflicting-path.bst
@@ -0,0 +1,13 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject
+
+#
+# Here we are declaring a junction to subproject, and trying to override
+# it's subproject with a deep subproject, using a different junction to
+# the same subproject `subproject.bst`
+#
+config:
+ overrides:
+ subsubproject.bst: subproject.bst:subsubproject.bst:subsubsubproject.bst
diff --git a/tests/format/junctions/conflicts/subproject.bst b/tests/format/junctions/conflicts/subproject.bst
new file mode 100644
index 000000000..c88189cb0
--- /dev/null
+++ b/tests/format/junctions/conflicts/subproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject
diff --git a/tests/format/junctions/conflicts/subproject/project.conf b/tests/format/junctions/conflicts/subproject/project.conf
new file mode 100644
index 000000000..39a53e2ab
--- /dev/null
+++ b/tests/format/junctions/conflicts/subproject/project.conf
@@ -0,0 +1,2 @@
+name: subtest
+min-version: 2.0
diff --git a/tests/format/junctions/conflicts/subproject/sub.txt b/tests/format/junctions/conflicts/subproject/sub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/conflicts/subproject/sub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/conflicts/subproject/subsubproject-conflict-target.bst b/tests/format/junctions/conflicts/subproject/subsubproject-conflict-target.bst
new file mode 100644
index 000000000..e9bf1c57e
--- /dev/null
+++ b/tests/format/junctions/conflicts/subproject/subsubproject-conflict-target.bst
@@ -0,0 +1,4 @@
+kind: stack
+
+depends:
+- subsubproject-conflict.bst:target.bst
diff --git a/tests/format/junctions/conflicts/subproject/subsubproject-conflict.bst b/tests/format/junctions/conflicts/subproject/subsubproject-conflict.bst
new file mode 100644
index 000000000..e4715ea1d
--- /dev/null
+++ b/tests/format/junctions/conflicts/subproject/subsubproject-conflict.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subsubproject-conflict
diff --git a/tests/format/junctions/conflicts/subproject/subsubproject-conflict/deepsurprise.txt b/tests/format/junctions/conflicts/subproject/subsubproject-conflict/deepsurprise.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/conflicts/subproject/subsubproject-conflict/deepsurprise.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/conflicts/subproject/subsubproject-conflict/project.conf b/tests/format/junctions/conflicts/subproject/subsubproject-conflict/project.conf
new file mode 100644
index 000000000..20636c446
--- /dev/null
+++ b/tests/format/junctions/conflicts/subproject/subsubproject-conflict/project.conf
@@ -0,0 +1,2 @@
+name: test
+min-version: 2.0
diff --git a/tests/format/junctions/conflicts/subproject/subsubproject-conflict/target.bst b/tests/format/junctions/conflicts/subproject/subsubproject-conflict/target.bst
new file mode 100644
index 000000000..981f29da3
--- /dev/null
+++ b/tests/format/junctions/conflicts/subproject/subsubproject-conflict/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: deepsurprise.txt
diff --git a/tests/format/junctions/conflicts/subproject/subsubproject.bst b/tests/format/junctions/conflicts/subproject/subsubproject.bst
new file mode 100644
index 000000000..f535ab0e0
--- /dev/null
+++ b/tests/format/junctions/conflicts/subproject/subsubproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subsubproject
diff --git a/tests/format/junctions/conflicts/subproject/subsubproject/project.conf b/tests/format/junctions/conflicts/subproject/subsubproject/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/conflicts/subproject/subsubproject/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/conflicts/subproject/subsubproject/subsub.txt b/tests/format/junctions/conflicts/subproject/subsubproject/subsub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/conflicts/subproject/subsubproject/subsub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/conflicts/subproject/subsubproject/subsubsubproject.bst b/tests/format/junctions/conflicts/subproject/subsubproject/subsubsubproject.bst
new file mode 100644
index 000000000..bce64597b
--- /dev/null
+++ b/tests/format/junctions/conflicts/subproject/subsubproject/subsubsubproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subsubsubproject
diff --git a/tests/format/junctions/conflicts/subproject/subsubproject/subsubsubproject/project.conf b/tests/format/junctions/conflicts/subproject/subsubproject/subsubsubproject/project.conf
new file mode 100644
index 000000000..e508da808
--- /dev/null
+++ b/tests/format/junctions/conflicts/subproject/subsubproject/subsubsubproject/project.conf
@@ -0,0 +1,2 @@
+name: subsubsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/conflicts/subproject/subsubproject/subsubsubproject/subsubsub.txt b/tests/format/junctions/conflicts/subproject/subsubproject/subsubsubproject/subsubsub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/conflicts/subproject/subsubproject/subsubsubproject/subsubsub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/conflicts/subproject/subsubproject/subsubsubproject/target.bst b/tests/format/junctions/conflicts/subproject/subsubproject/subsubsubproject/target.bst
new file mode 100644
index 000000000..351c9a22d
--- /dev/null
+++ b/tests/format/junctions/conflicts/subproject/subsubproject/subsubsubproject/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: subsubsub.txt
diff --git a/tests/format/junctions/conflicts/subproject/subsubproject/target.bst b/tests/format/junctions/conflicts/subproject/subsubproject/target.bst
new file mode 100644
index 000000000..afafac601
--- /dev/null
+++ b/tests/format/junctions/conflicts/subproject/subsubproject/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: subsub.txt
diff --git a/tests/format/junctions/conflicts/subproject/target.bst b/tests/format/junctions/conflicts/subproject/target.bst
new file mode 100644
index 000000000..e24d9bbb4
--- /dev/null
+++ b/tests/format/junctions/conflicts/subproject/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub.txt
diff --git a/tests/format/junctions/conflicts/subproject2.bst b/tests/format/junctions/conflicts/subproject2.bst
new file mode 100644
index 000000000..2343652e1
--- /dev/null
+++ b/tests/format/junctions/conflicts/subproject2.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject2
diff --git a/tests/format/junctions/conflicts/subproject2/inc.yaml b/tests/format/junctions/conflicts/subproject2/inc.yaml
new file mode 100644
index 000000000..bbc78380f
--- /dev/null
+++ b/tests/format/junctions/conflicts/subproject2/inc.yaml
@@ -0,0 +1 @@
+test: Pony
diff --git a/tests/format/junctions/conflicts/subproject2/plugins/found.py b/tests/format/junctions/conflicts/subproject2/plugins/found.py
new file mode 100644
index 000000000..34a7e4398
--- /dev/null
+++ b/tests/format/junctions/conflicts/subproject2/plugins/found.py
@@ -0,0 +1,19 @@
+from buildstream import Element
+
+
+class Found(Element):
+ BST_MIN_VERSION = "2.0"
+
+ def configure(self, node):
+ pass
+
+ def preflight(self):
+ pass
+
+ def get_unique_key(self):
+ return {}
+
+
+# Plugin entry point
+def setup():
+ return Found
diff --git a/tests/format/junctions/conflicts/subproject2/project.conf b/tests/format/junctions/conflicts/subproject2/project.conf
new file mode 100644
index 000000000..286045aa0
--- /dev/null
+++ b/tests/format/junctions/conflicts/subproject2/project.conf
@@ -0,0 +1,8 @@
+name: subtest
+min-version: 2.0
+
+plugins:
+- origin: local
+ path: plugins
+ elements:
+ - found
diff --git a/tests/format/junctions/conflicts/subproject2/sub2.txt b/tests/format/junctions/conflicts/subproject2/sub2.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/conflicts/subproject2/sub2.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/conflicts/subproject2/target.bst b/tests/format/junctions/conflicts/subproject2/target.bst
new file mode 100644
index 000000000..a1d15e942
--- /dev/null
+++ b/tests/format/junctions/conflicts/subproject2/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub2.txt
diff --git a/tests/format/junctions/duplicates-nested-full-path/project.conf b/tests/format/junctions/duplicates-nested-full-path/project.conf
new file mode 100644
index 000000000..ddac93c49
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-full-path/project.conf
@@ -0,0 +1,9 @@
+name: test
+min-version: 2.0
+
+junctions:
+ duplicates:
+ subsubtest:
+ - subproject.bst:subproject1.bst
+ - subproject.bst:subproject2.bst
+ - subproject3.bst
diff --git a/tests/format/junctions/duplicates-nested-full-path/subproject.bst b/tests/format/junctions/duplicates-nested-full-path/subproject.bst
new file mode 100644
index 000000000..c88189cb0
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-full-path/subproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject
diff --git a/tests/format/junctions/duplicates-nested-full-path/subproject/project.conf b/tests/format/junctions/duplicates-nested-full-path/subproject/project.conf
new file mode 100644
index 000000000..39a53e2ab
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-full-path/subproject/project.conf
@@ -0,0 +1,2 @@
+name: subtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-nested-full-path/subproject/subproject1.bst b/tests/format/junctions/duplicates-nested-full-path/subproject/subproject1.bst
new file mode 100644
index 000000000..bfd692d00
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-full-path/subproject/subproject1.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject1
diff --git a/tests/format/junctions/duplicates-nested-full-path/subproject/subproject1/project.conf b/tests/format/junctions/duplicates-nested-full-path/subproject/subproject1/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-full-path/subproject/subproject1/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-nested-full-path/subproject/subproject1/sub.txt b/tests/format/junctions/duplicates-nested-full-path/subproject/subproject1/sub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-full-path/subproject/subproject1/sub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-nested-full-path/subproject/subproject1/target.bst b/tests/format/junctions/duplicates-nested-full-path/subproject/subproject1/target.bst
new file mode 100644
index 000000000..e24d9bbb4
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-full-path/subproject/subproject1/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub.txt
diff --git a/tests/format/junctions/duplicates-nested-full-path/subproject/subproject2.bst b/tests/format/junctions/duplicates-nested-full-path/subproject/subproject2.bst
new file mode 100644
index 000000000..2343652e1
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-full-path/subproject/subproject2.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject2
diff --git a/tests/format/junctions/duplicates-nested-full-path/subproject/subproject2/project.conf b/tests/format/junctions/duplicates-nested-full-path/subproject/subproject2/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-full-path/subproject/subproject2/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-nested-full-path/subproject/subproject2/sub2.txt b/tests/format/junctions/duplicates-nested-full-path/subproject/subproject2/sub2.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-full-path/subproject/subproject2/sub2.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-nested-full-path/subproject/subproject2/target.bst b/tests/format/junctions/duplicates-nested-full-path/subproject/subproject2/target.bst
new file mode 100644
index 000000000..a1d15e942
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-full-path/subproject/subproject2/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub2.txt
diff --git a/tests/format/junctions/duplicates-nested-full-path/subproject3.bst b/tests/format/junctions/duplicates-nested-full-path/subproject3.bst
new file mode 100644
index 000000000..e4ee2f1d5
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-full-path/subproject3.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject3
diff --git a/tests/format/junctions/duplicates-nested-full-path/subproject3/project.conf b/tests/format/junctions/duplicates-nested-full-path/subproject3/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-full-path/subproject3/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-nested-full-path/subproject3/sub3.txt b/tests/format/junctions/duplicates-nested-full-path/subproject3/sub3.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-full-path/subproject3/sub3.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-nested-full-path/subproject3/target.bst b/tests/format/junctions/duplicates-nested-full-path/subproject3/target.bst
new file mode 100644
index 000000000..cb81ea97f
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-full-path/subproject3/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub3.txt
diff --git a/tests/format/junctions/duplicates-nested-full-path/target.bst b/tests/format/junctions/duplicates-nested-full-path/target.bst
new file mode 100644
index 000000000..c9199fe0f
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-full-path/target.bst
@@ -0,0 +1,6 @@
+kind: stack
+
+depends:
+- subproject.bst:subproject1.bst:target.bst
+- subproject.bst:subproject2.bst:target.bst
+- subproject3.bst:target.bst
diff --git a/tests/format/junctions/duplicates-nested-incomplete/project.conf b/tests/format/junctions/duplicates-nested-incomplete/project.conf
new file mode 100644
index 000000000..2e4aff856
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-incomplete/project.conf
@@ -0,0 +1,7 @@
+name: test
+min-version: 2.0
+
+junctions:
+ duplicates:
+ subsubtest:
+ - subproject3.bst
diff --git a/tests/format/junctions/duplicates-nested-incomplete/subproject.bst b/tests/format/junctions/duplicates-nested-incomplete/subproject.bst
new file mode 100644
index 000000000..c88189cb0
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-incomplete/subproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject
diff --git a/tests/format/junctions/duplicates-nested-incomplete/subproject/project.conf b/tests/format/junctions/duplicates-nested-incomplete/subproject/project.conf
new file mode 100644
index 000000000..b9cc870a8
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-incomplete/subproject/project.conf
@@ -0,0 +1,7 @@
+name: subtest
+min-version: 2.0
+
+junctions:
+ duplicates:
+ subsubtest:
+ - subproject1.bst
diff --git a/tests/format/junctions/duplicates-nested-incomplete/subproject/subproject1.bst b/tests/format/junctions/duplicates-nested-incomplete/subproject/subproject1.bst
new file mode 100644
index 000000000..bfd692d00
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-incomplete/subproject/subproject1.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject1
diff --git a/tests/format/junctions/duplicates-nested-incomplete/subproject/subproject1/project.conf b/tests/format/junctions/duplicates-nested-incomplete/subproject/subproject1/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-incomplete/subproject/subproject1/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-nested-incomplete/subproject/subproject1/sub.txt b/tests/format/junctions/duplicates-nested-incomplete/subproject/subproject1/sub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-incomplete/subproject/subproject1/sub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-nested-incomplete/subproject/subproject1/target.bst b/tests/format/junctions/duplicates-nested-incomplete/subproject/subproject1/target.bst
new file mode 100644
index 000000000..e24d9bbb4
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-incomplete/subproject/subproject1/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub.txt
diff --git a/tests/format/junctions/duplicates-nested-incomplete/subproject/subproject2.bst b/tests/format/junctions/duplicates-nested-incomplete/subproject/subproject2.bst
new file mode 100644
index 000000000..2343652e1
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-incomplete/subproject/subproject2.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject2
diff --git a/tests/format/junctions/duplicates-nested-incomplete/subproject/subproject2/project.conf b/tests/format/junctions/duplicates-nested-incomplete/subproject/subproject2/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-incomplete/subproject/subproject2/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-nested-incomplete/subproject/subproject2/sub2.txt b/tests/format/junctions/duplicates-nested-incomplete/subproject/subproject2/sub2.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-incomplete/subproject/subproject2/sub2.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-nested-incomplete/subproject/subproject2/target.bst b/tests/format/junctions/duplicates-nested-incomplete/subproject/subproject2/target.bst
new file mode 100644
index 000000000..a1d15e942
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-incomplete/subproject/subproject2/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub2.txt
diff --git a/tests/format/junctions/duplicates-nested-incomplete/subproject3.bst b/tests/format/junctions/duplicates-nested-incomplete/subproject3.bst
new file mode 100644
index 000000000..e4ee2f1d5
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-incomplete/subproject3.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject3
diff --git a/tests/format/junctions/duplicates-nested-incomplete/subproject3/project.conf b/tests/format/junctions/duplicates-nested-incomplete/subproject3/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-incomplete/subproject3/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-nested-incomplete/subproject3/sub3.txt b/tests/format/junctions/duplicates-nested-incomplete/subproject3/sub3.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-incomplete/subproject3/sub3.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-nested-incomplete/subproject3/target.bst b/tests/format/junctions/duplicates-nested-incomplete/subproject3/target.bst
new file mode 100644
index 000000000..cb81ea97f
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-incomplete/subproject3/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub3.txt
diff --git a/tests/format/junctions/duplicates-nested-incomplete/target.bst b/tests/format/junctions/duplicates-nested-incomplete/target.bst
new file mode 100644
index 000000000..28e981ea3
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-incomplete/target.bst
@@ -0,0 +1,6 @@
+kind: stack
+
+depends:
+- subproject3.bst:target.bst
+- subproject.bst:subproject1.bst:target.bst
+- subproject.bst:subproject2.bst:target.bst
diff --git a/tests/format/junctions/duplicates-nested-link1/project.conf b/tests/format/junctions/duplicates-nested-link1/project.conf
new file mode 100644
index 000000000..e229b9f1f
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link1/project.conf
@@ -0,0 +1,8 @@
+name: test
+min-version: 2.0
+
+junctions:
+ duplicates:
+ subsubtest:
+ - subproject3.bst
+ - subproject.bst:subproject1-link.bst
diff --git a/tests/format/junctions/duplicates-nested-link1/subproject.bst b/tests/format/junctions/duplicates-nested-link1/subproject.bst
new file mode 100644
index 000000000..c88189cb0
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link1/subproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject
diff --git a/tests/format/junctions/duplicates-nested-link1/subproject/project.conf b/tests/format/junctions/duplicates-nested-link1/subproject/project.conf
new file mode 100644
index 000000000..0be41104a
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link1/subproject/project.conf
@@ -0,0 +1,7 @@
+name: subtest
+min-version: 2.0
+
+junctions:
+ duplicates:
+ subsubtest:
+ - subproject2.bst
diff --git a/tests/format/junctions/duplicates-nested-link1/subproject/subproject1-link.bst b/tests/format/junctions/duplicates-nested-link1/subproject/subproject1-link.bst
new file mode 100644
index 000000000..0e6d8a484
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link1/subproject/subproject1-link.bst
@@ -0,0 +1,4 @@
+kind: link
+
+config:
+ target: subproject1.bst
diff --git a/tests/format/junctions/duplicates-nested-link1/subproject/subproject1.bst b/tests/format/junctions/duplicates-nested-link1/subproject/subproject1.bst
new file mode 100644
index 000000000..bfd692d00
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link1/subproject/subproject1.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject1
diff --git a/tests/format/junctions/duplicates-nested-link1/subproject/subproject1/project.conf b/tests/format/junctions/duplicates-nested-link1/subproject/subproject1/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link1/subproject/subproject1/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-nested-link1/subproject/subproject1/sub.txt b/tests/format/junctions/duplicates-nested-link1/subproject/subproject1/sub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link1/subproject/subproject1/sub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-nested-link1/subproject/subproject1/target.bst b/tests/format/junctions/duplicates-nested-link1/subproject/subproject1/target.bst
new file mode 100644
index 000000000..e24d9bbb4
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link1/subproject/subproject1/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub.txt
diff --git a/tests/format/junctions/duplicates-nested-link1/subproject/subproject2.bst b/tests/format/junctions/duplicates-nested-link1/subproject/subproject2.bst
new file mode 100644
index 000000000..2343652e1
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link1/subproject/subproject2.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject2
diff --git a/tests/format/junctions/duplicates-nested-link1/subproject/subproject2/project.conf b/tests/format/junctions/duplicates-nested-link1/subproject/subproject2/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link1/subproject/subproject2/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-nested-link1/subproject/subproject2/sub2.txt b/tests/format/junctions/duplicates-nested-link1/subproject/subproject2/sub2.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link1/subproject/subproject2/sub2.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-nested-link1/subproject/subproject2/target.bst b/tests/format/junctions/duplicates-nested-link1/subproject/subproject2/target.bst
new file mode 100644
index 000000000..a1d15e942
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link1/subproject/subproject2/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub2.txt
diff --git a/tests/format/junctions/duplicates-nested-link1/subproject3.bst b/tests/format/junctions/duplicates-nested-link1/subproject3.bst
new file mode 100644
index 000000000..e4ee2f1d5
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link1/subproject3.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject3
diff --git a/tests/format/junctions/duplicates-nested-link1/subproject3/project.conf b/tests/format/junctions/duplicates-nested-link1/subproject3/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link1/subproject3/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-nested-link1/subproject3/sub3.txt b/tests/format/junctions/duplicates-nested-link1/subproject3/sub3.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link1/subproject3/sub3.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-nested-link1/subproject3/target.bst b/tests/format/junctions/duplicates-nested-link1/subproject3/target.bst
new file mode 100644
index 000000000..cb81ea97f
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link1/subproject3/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub3.txt
diff --git a/tests/format/junctions/duplicates-nested-link1/target.bst b/tests/format/junctions/duplicates-nested-link1/target.bst
new file mode 100644
index 000000000..c9199fe0f
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link1/target.bst
@@ -0,0 +1,6 @@
+kind: stack
+
+depends:
+- subproject.bst:subproject1.bst:target.bst
+- subproject.bst:subproject2.bst:target.bst
+- subproject3.bst:target.bst
diff --git a/tests/format/junctions/duplicates-nested-link2/project.conf b/tests/format/junctions/duplicates-nested-link2/project.conf
new file mode 100644
index 000000000..2e4aff856
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link2/project.conf
@@ -0,0 +1,7 @@
+name: test
+min-version: 2.0
+
+junctions:
+ duplicates:
+ subsubtest:
+ - subproject3.bst
diff --git a/tests/format/junctions/duplicates-nested-link2/subproject.bst b/tests/format/junctions/duplicates-nested-link2/subproject.bst
new file mode 100644
index 000000000..c88189cb0
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link2/subproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject
diff --git a/tests/format/junctions/duplicates-nested-link2/subproject/project.conf b/tests/format/junctions/duplicates-nested-link2/subproject/project.conf
new file mode 100644
index 000000000..99ccfa68c
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link2/subproject/project.conf
@@ -0,0 +1,8 @@
+name: subtest
+min-version: 2.0
+
+junctions:
+ duplicates:
+ subsubtest:
+ - subproject1.bst
+ - subproject2.bst
diff --git a/tests/format/junctions/duplicates-nested-link2/subproject/subproject1.bst b/tests/format/junctions/duplicates-nested-link2/subproject/subproject1.bst
new file mode 100644
index 000000000..bfd692d00
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link2/subproject/subproject1.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject1
diff --git a/tests/format/junctions/duplicates-nested-link2/subproject/subproject1/project.conf b/tests/format/junctions/duplicates-nested-link2/subproject/subproject1/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link2/subproject/subproject1/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-nested-link2/subproject/subproject1/sub.txt b/tests/format/junctions/duplicates-nested-link2/subproject/subproject1/sub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link2/subproject/subproject1/sub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-nested-link2/subproject/subproject1/target.bst b/tests/format/junctions/duplicates-nested-link2/subproject/subproject1/target.bst
new file mode 100644
index 000000000..e24d9bbb4
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link2/subproject/subproject1/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub.txt
diff --git a/tests/format/junctions/duplicates-nested-link2/subproject/subproject2.bst b/tests/format/junctions/duplicates-nested-link2/subproject/subproject2.bst
new file mode 100644
index 000000000..2343652e1
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link2/subproject/subproject2.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject2
diff --git a/tests/format/junctions/duplicates-nested-link2/subproject/subproject2/project.conf b/tests/format/junctions/duplicates-nested-link2/subproject/subproject2/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link2/subproject/subproject2/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-nested-link2/subproject/subproject2/sub2.txt b/tests/format/junctions/duplicates-nested-link2/subproject/subproject2/sub2.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link2/subproject/subproject2/sub2.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-nested-link2/subproject/subproject2/target.bst b/tests/format/junctions/duplicates-nested-link2/subproject/subproject2/target.bst
new file mode 100644
index 000000000..a1d15e942
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link2/subproject/subproject2/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub2.txt
diff --git a/tests/format/junctions/duplicates-nested-link2/subproject2-link.bst b/tests/format/junctions/duplicates-nested-link2/subproject2-link.bst
new file mode 100644
index 000000000..c7803f902
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link2/subproject2-link.bst
@@ -0,0 +1,4 @@
+kind: link
+
+config:
+ target: subproject.bst:subproject2.bst
diff --git a/tests/format/junctions/duplicates-nested-link2/subproject3.bst b/tests/format/junctions/duplicates-nested-link2/subproject3.bst
new file mode 100644
index 000000000..e4ee2f1d5
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link2/subproject3.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject3
diff --git a/tests/format/junctions/duplicates-nested-link2/subproject3/project.conf b/tests/format/junctions/duplicates-nested-link2/subproject3/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link2/subproject3/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-nested-link2/subproject3/sub3.txt b/tests/format/junctions/duplicates-nested-link2/subproject3/sub3.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link2/subproject3/sub3.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-nested-link2/subproject3/target.bst b/tests/format/junctions/duplicates-nested-link2/subproject3/target.bst
new file mode 100644
index 000000000..cb81ea97f
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link2/subproject3/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub3.txt
diff --git a/tests/format/junctions/duplicates-nested-link2/target.bst b/tests/format/junctions/duplicates-nested-link2/target.bst
new file mode 100644
index 000000000..3e3906da0
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-link2/target.bst
@@ -0,0 +1,6 @@
+kind: stack
+
+depends:
+- subproject.bst:subproject1.bst:target.bst
+- subproject2-link.bst:target.bst
+- subproject3.bst:target.bst
diff --git a/tests/format/junctions/duplicates-nested-not-found/project.conf b/tests/format/junctions/duplicates-nested-not-found/project.conf
new file mode 100644
index 000000000..e229b9f1f
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-not-found/project.conf
@@ -0,0 +1,8 @@
+name: test
+min-version: 2.0
+
+junctions:
+ duplicates:
+ subsubtest:
+ - subproject3.bst
+ - subproject.bst:subproject1-link.bst
diff --git a/tests/format/junctions/duplicates-nested-not-found/subproject.bst b/tests/format/junctions/duplicates-nested-not-found/subproject.bst
new file mode 100644
index 000000000..c88189cb0
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-not-found/subproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject
diff --git a/tests/format/junctions/duplicates-nested-not-found/subproject/project.conf b/tests/format/junctions/duplicates-nested-not-found/subproject/project.conf
new file mode 100644
index 000000000..0be41104a
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-not-found/subproject/project.conf
@@ -0,0 +1,7 @@
+name: subtest
+min-version: 2.0
+
+junctions:
+ duplicates:
+ subsubtest:
+ - subproject2.bst
diff --git a/tests/format/junctions/duplicates-nested-not-found/subproject/subproject1-link.bst b/tests/format/junctions/duplicates-nested-not-found/subproject/subproject1-link.bst
new file mode 100644
index 000000000..642ab8c42
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-not-found/subproject/subproject1-link.bst
@@ -0,0 +1,4 @@
+kind: link
+
+config:
+ target: subproject5.bst
diff --git a/tests/format/junctions/duplicates-nested-not-found/subproject/subproject1.bst b/tests/format/junctions/duplicates-nested-not-found/subproject/subproject1.bst
new file mode 100644
index 000000000..bfd692d00
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-not-found/subproject/subproject1.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject1
diff --git a/tests/format/junctions/duplicates-nested-not-found/subproject/subproject1/project.conf b/tests/format/junctions/duplicates-nested-not-found/subproject/subproject1/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-not-found/subproject/subproject1/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-nested-not-found/subproject/subproject1/sub.txt b/tests/format/junctions/duplicates-nested-not-found/subproject/subproject1/sub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-not-found/subproject/subproject1/sub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-nested-not-found/subproject/subproject1/target.bst b/tests/format/junctions/duplicates-nested-not-found/subproject/subproject1/target.bst
new file mode 100644
index 000000000..e24d9bbb4
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-not-found/subproject/subproject1/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub.txt
diff --git a/tests/format/junctions/duplicates-nested-not-found/subproject/subproject2.bst b/tests/format/junctions/duplicates-nested-not-found/subproject/subproject2.bst
new file mode 100644
index 000000000..2343652e1
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-not-found/subproject/subproject2.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject2
diff --git a/tests/format/junctions/duplicates-nested-not-found/subproject/subproject2/project.conf b/tests/format/junctions/duplicates-nested-not-found/subproject/subproject2/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-not-found/subproject/subproject2/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-nested-not-found/subproject/subproject2/sub2.txt b/tests/format/junctions/duplicates-nested-not-found/subproject/subproject2/sub2.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-not-found/subproject/subproject2/sub2.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-nested-not-found/subproject/subproject2/target.bst b/tests/format/junctions/duplicates-nested-not-found/subproject/subproject2/target.bst
new file mode 100644
index 000000000..a1d15e942
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-not-found/subproject/subproject2/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub2.txt
diff --git a/tests/format/junctions/duplicates-nested-not-found/subproject3.bst b/tests/format/junctions/duplicates-nested-not-found/subproject3.bst
new file mode 100644
index 000000000..e4ee2f1d5
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-not-found/subproject3.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject3
diff --git a/tests/format/junctions/duplicates-nested-not-found/subproject3/project.conf b/tests/format/junctions/duplicates-nested-not-found/subproject3/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-not-found/subproject3/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-nested-not-found/subproject3/sub3.txt b/tests/format/junctions/duplicates-nested-not-found/subproject3/sub3.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-not-found/subproject3/sub3.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-nested-not-found/subproject3/target.bst b/tests/format/junctions/duplicates-nested-not-found/subproject3/target.bst
new file mode 100644
index 000000000..cb81ea97f
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-not-found/subproject3/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub3.txt
diff --git a/tests/format/junctions/duplicates-nested-not-found/target.bst b/tests/format/junctions/duplicates-nested-not-found/target.bst
new file mode 100644
index 000000000..c9199fe0f
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested-not-found/target.bst
@@ -0,0 +1,6 @@
+kind: stack
+
+depends:
+- subproject.bst:subproject1.bst:target.bst
+- subproject.bst:subproject2.bst:target.bst
+- subproject3.bst:target.bst
diff --git a/tests/format/junctions/duplicates-nested/project.conf b/tests/format/junctions/duplicates-nested/project.conf
new file mode 100644
index 000000000..2e4aff856
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested/project.conf
@@ -0,0 +1,7 @@
+name: test
+min-version: 2.0
+
+junctions:
+ duplicates:
+ subsubtest:
+ - subproject3.bst
diff --git a/tests/format/junctions/duplicates-nested/subproject.bst b/tests/format/junctions/duplicates-nested/subproject.bst
new file mode 100644
index 000000000..c88189cb0
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested/subproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject
diff --git a/tests/format/junctions/duplicates-nested/subproject/project.conf b/tests/format/junctions/duplicates-nested/subproject/project.conf
new file mode 100644
index 000000000..99ccfa68c
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested/subproject/project.conf
@@ -0,0 +1,8 @@
+name: subtest
+min-version: 2.0
+
+junctions:
+ duplicates:
+ subsubtest:
+ - subproject1.bst
+ - subproject2.bst
diff --git a/tests/format/junctions/duplicates-nested/subproject/subproject1.bst b/tests/format/junctions/duplicates-nested/subproject/subproject1.bst
new file mode 100644
index 000000000..bfd692d00
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested/subproject/subproject1.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject1
diff --git a/tests/format/junctions/duplicates-nested/subproject/subproject1/project.conf b/tests/format/junctions/duplicates-nested/subproject/subproject1/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested/subproject/subproject1/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-nested/subproject/subproject1/sub.txt b/tests/format/junctions/duplicates-nested/subproject/subproject1/sub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested/subproject/subproject1/sub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-nested/subproject/subproject1/target.bst b/tests/format/junctions/duplicates-nested/subproject/subproject1/target.bst
new file mode 100644
index 000000000..e24d9bbb4
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested/subproject/subproject1/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub.txt
diff --git a/tests/format/junctions/duplicates-nested/subproject/subproject2.bst b/tests/format/junctions/duplicates-nested/subproject/subproject2.bst
new file mode 100644
index 000000000..2343652e1
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested/subproject/subproject2.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject2
diff --git a/tests/format/junctions/duplicates-nested/subproject/subproject2/project.conf b/tests/format/junctions/duplicates-nested/subproject/subproject2/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested/subproject/subproject2/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-nested/subproject/subproject2/sub2.txt b/tests/format/junctions/duplicates-nested/subproject/subproject2/sub2.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested/subproject/subproject2/sub2.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-nested/subproject/subproject2/target.bst b/tests/format/junctions/duplicates-nested/subproject/subproject2/target.bst
new file mode 100644
index 000000000..a1d15e942
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested/subproject/subproject2/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub2.txt
diff --git a/tests/format/junctions/duplicates-nested/subproject3.bst b/tests/format/junctions/duplicates-nested/subproject3.bst
new file mode 100644
index 000000000..e4ee2f1d5
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested/subproject3.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject3
diff --git a/tests/format/junctions/duplicates-nested/subproject3/project.conf b/tests/format/junctions/duplicates-nested/subproject3/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested/subproject3/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-nested/subproject3/sub3.txt b/tests/format/junctions/duplicates-nested/subproject3/sub3.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested/subproject3/sub3.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-nested/subproject3/target.bst b/tests/format/junctions/duplicates-nested/subproject3/target.bst
new file mode 100644
index 000000000..cb81ea97f
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested/subproject3/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub3.txt
diff --git a/tests/format/junctions/duplicates-nested/target.bst b/tests/format/junctions/duplicates-nested/target.bst
new file mode 100644
index 000000000..c9199fe0f
--- /dev/null
+++ b/tests/format/junctions/duplicates-nested/target.bst
@@ -0,0 +1,6 @@
+kind: stack
+
+depends:
+- subproject.bst:subproject1.bst:target.bst
+- subproject.bst:subproject2.bst:target.bst
+- subproject3.bst:target.bst
diff --git a/tests/format/junctions/duplicates-override-dup/project.conf b/tests/format/junctions/duplicates-override-dup/project.conf
new file mode 100644
index 000000000..20636c446
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-dup/project.conf
@@ -0,0 +1,2 @@
+name: test
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-override-dup/subproject.bst b/tests/format/junctions/duplicates-override-dup/subproject.bst
new file mode 100644
index 000000000..376ac11ee
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-dup/subproject.bst
@@ -0,0 +1,8 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject
+
+config:
+ overrides:
+ subproject1.bst: subproject3.bst
diff --git a/tests/format/junctions/duplicates-override-dup/subproject/project.conf b/tests/format/junctions/duplicates-override-dup/subproject/project.conf
new file mode 100644
index 000000000..99ccfa68c
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-dup/subproject/project.conf
@@ -0,0 +1,8 @@
+name: subtest
+min-version: 2.0
+
+junctions:
+ duplicates:
+ subsubtest:
+ - subproject1.bst
+ - subproject2.bst
diff --git a/tests/format/junctions/duplicates-override-dup/subproject/subproject1.bst b/tests/format/junctions/duplicates-override-dup/subproject/subproject1.bst
new file mode 100644
index 000000000..bfd692d00
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-dup/subproject/subproject1.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject1
diff --git a/tests/format/junctions/duplicates-override-dup/subproject/subproject1/project.conf b/tests/format/junctions/duplicates-override-dup/subproject/subproject1/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-dup/subproject/subproject1/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-override-dup/subproject/subproject1/sub.txt b/tests/format/junctions/duplicates-override-dup/subproject/subproject1/sub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-dup/subproject/subproject1/sub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-override-dup/subproject/subproject1/target.bst b/tests/format/junctions/duplicates-override-dup/subproject/subproject1/target.bst
new file mode 100644
index 000000000..e24d9bbb4
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-dup/subproject/subproject1/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub.txt
diff --git a/tests/format/junctions/duplicates-override-dup/subproject/subproject2.bst b/tests/format/junctions/duplicates-override-dup/subproject/subproject2.bst
new file mode 100644
index 000000000..2343652e1
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-dup/subproject/subproject2.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject2
diff --git a/tests/format/junctions/duplicates-override-dup/subproject/subproject2/project.conf b/tests/format/junctions/duplicates-override-dup/subproject/subproject2/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-dup/subproject/subproject2/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-override-dup/subproject/subproject2/sub2.txt b/tests/format/junctions/duplicates-override-dup/subproject/subproject2/sub2.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-dup/subproject/subproject2/sub2.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-override-dup/subproject/subproject2/target.bst b/tests/format/junctions/duplicates-override-dup/subproject/subproject2/target.bst
new file mode 100644
index 000000000..a1d15e942
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-dup/subproject/subproject2/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub2.txt
diff --git a/tests/format/junctions/duplicates-override-dup/subproject3.bst b/tests/format/junctions/duplicates-override-dup/subproject3.bst
new file mode 100644
index 000000000..e4ee2f1d5
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-dup/subproject3.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject3
diff --git a/tests/format/junctions/duplicates-override-dup/subproject3/project.conf b/tests/format/junctions/duplicates-override-dup/subproject3/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-dup/subproject3/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-override-dup/subproject3/sub3.txt b/tests/format/junctions/duplicates-override-dup/subproject3/sub3.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-dup/subproject3/sub3.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-override-dup/subproject3/target.bst b/tests/format/junctions/duplicates-override-dup/subproject3/target.bst
new file mode 100644
index 000000000..cb81ea97f
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-dup/subproject3/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub3.txt
diff --git a/tests/format/junctions/duplicates-override-dup/target.bst b/tests/format/junctions/duplicates-override-dup/target.bst
new file mode 100644
index 000000000..6ca140afb
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-dup/target.bst
@@ -0,0 +1,5 @@
+kind: stack
+
+depends:
+- subproject.bst:subproject1.bst:target.bst
+- subproject.bst:subproject2.bst:target.bst
diff --git a/tests/format/junctions/duplicates-override-twice-link/duplicate.bst b/tests/format/junctions/duplicates-override-twice-link/duplicate.bst
new file mode 100644
index 000000000..4acb6e63b
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-twice-link/duplicate.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: duplicate
diff --git a/tests/format/junctions/duplicates-override-twice-link/duplicate/duplicate.txt b/tests/format/junctions/duplicates-override-twice-link/duplicate/duplicate.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-twice-link/duplicate/duplicate.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-override-twice-link/duplicate/project.conf b/tests/format/junctions/duplicates-override-twice-link/duplicate/project.conf
new file mode 100644
index 000000000..e508da808
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-twice-link/duplicate/project.conf
@@ -0,0 +1,2 @@
+name: subsubsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-override-twice-link/duplicate/target.bst b/tests/format/junctions/duplicates-override-twice-link/duplicate/target.bst
new file mode 100644
index 000000000..8b350a12f
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-twice-link/duplicate/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: duplicate.txt
diff --git a/tests/format/junctions/conflict/foo.bst b/tests/format/junctions/duplicates-override-twice-link/override.bst
index 1feb4010b..c0564b631 100644
--- a/tests/format/junctions/conflict/foo.bst
+++ b/tests/format/junctions/duplicates-override-twice-link/override.bst
@@ -1,4 +1,4 @@
kind: junction
sources:
- kind: local
- path: foo
+ path: override
diff --git a/tests/format/junctions/duplicates-override-twice-link/override/overridden-again.txt b/tests/format/junctions/duplicates-override-twice-link/override/overridden-again.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-twice-link/override/overridden-again.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-override-twice-link/override/project.conf b/tests/format/junctions/duplicates-override-twice-link/override/project.conf
new file mode 100644
index 000000000..e508da808
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-twice-link/override/project.conf
@@ -0,0 +1,2 @@
+name: subsubsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-override-twice-link/override/target.bst b/tests/format/junctions/duplicates-override-twice-link/override/target.bst
new file mode 100644
index 000000000..c05396c42
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-twice-link/override/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: overridden-again.txt
diff --git a/tests/format/junctions/duplicates-override-twice-link/project.conf b/tests/format/junctions/duplicates-override-twice-link/project.conf
new file mode 100644
index 000000000..3dbb08c35
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-twice-link/project.conf
@@ -0,0 +1,7 @@
+name: test
+min-version: 2.0
+
+junctions:
+ duplicates:
+ subsubsubtest:
+ - duplicate.bst
diff --git a/tests/format/junctions/duplicates-override-twice-link/subproject.bst b/tests/format/junctions/duplicates-override-twice-link/subproject.bst
new file mode 100644
index 000000000..297dbe90d
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-twice-link/subproject.bst
@@ -0,0 +1,8 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject
+
+config:
+ overrides:
+ subsubproject.bst:subsubsubproject.bst: override.bst
diff --git a/tests/format/junctions/foo/base.bst b/tests/format/junctions/duplicates-override-twice-link/subproject/override.bst
index 10ce559a9..c0564b631 100644
--- a/tests/format/junctions/foo/base.bst
+++ b/tests/format/junctions/duplicates-override-twice-link/subproject/override.bst
@@ -1,4 +1,4 @@
kind: junction
sources:
- kind: local
- path: base
+ path: override
diff --git a/tests/format/junctions/duplicates-override-twice-link/subproject/override/overridden.txt b/tests/format/junctions/duplicates-override-twice-link/subproject/override/overridden.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-twice-link/subproject/override/overridden.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-override-twice-link/subproject/override/project.conf b/tests/format/junctions/duplicates-override-twice-link/subproject/override/project.conf
new file mode 100644
index 000000000..e508da808
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-twice-link/subproject/override/project.conf
@@ -0,0 +1,2 @@
+name: subsubsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-override-twice-link/subproject/override/target.bst b/tests/format/junctions/duplicates-override-twice-link/subproject/override/target.bst
new file mode 100644
index 000000000..8a725bab6
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-twice-link/subproject/override/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: overridden.txt
diff --git a/tests/format/junctions/duplicates-override-twice-link/subproject/project.conf b/tests/format/junctions/duplicates-override-twice-link/subproject/project.conf
new file mode 100644
index 000000000..cf2fbc7f3
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-twice-link/subproject/project.conf
@@ -0,0 +1,7 @@
+name: subtest
+min-version: 2.0
+
+junctions:
+ duplicates:
+ subsubsubtest:
+ - subsubsubproject-link.bst
diff --git a/tests/format/junctions/duplicates-override-twice-link/subproject/subsubproject.bst b/tests/format/junctions/duplicates-override-twice-link/subproject/subsubproject.bst
new file mode 100644
index 000000000..fd5101878
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-twice-link/subproject/subsubproject.bst
@@ -0,0 +1,8 @@
+kind: junction
+sources:
+- kind: local
+ path: subsubproject
+
+config:
+ overrides:
+ subsubsubproject.bst: override.bst
diff --git a/tests/format/junctions/duplicates-override-twice-link/subproject/subsubproject/project.conf b/tests/format/junctions/duplicates-override-twice-link/subproject/subsubproject/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-twice-link/subproject/subsubproject/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-override-twice-link/subproject/subsubproject/subsubsubproject.bst b/tests/format/junctions/duplicates-override-twice-link/subproject/subsubproject/subsubsubproject.bst
new file mode 100644
index 000000000..bce64597b
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-twice-link/subproject/subsubproject/subsubsubproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subsubsubproject
diff --git a/tests/format/junctions/duplicates-override-twice-link/subproject/subsubproject/subsubsubproject/original.txt b/tests/format/junctions/duplicates-override-twice-link/subproject/subsubproject/subsubsubproject/original.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-twice-link/subproject/subsubproject/subsubsubproject/original.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-override-twice-link/subproject/subsubproject/subsubsubproject/project.conf b/tests/format/junctions/duplicates-override-twice-link/subproject/subsubproject/subsubsubproject/project.conf
new file mode 100644
index 000000000..e508da808
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-twice-link/subproject/subsubproject/subsubsubproject/project.conf
@@ -0,0 +1,2 @@
+name: subsubsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-override-twice-link/subproject/subsubproject/subsubsubproject/target.bst b/tests/format/junctions/duplicates-override-twice-link/subproject/subsubproject/subsubsubproject/target.bst
new file mode 100644
index 000000000..61edc6467
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-twice-link/subproject/subsubproject/subsubsubproject/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: original.txt
diff --git a/tests/format/junctions/duplicates-override-twice-link/subproject/subsubsubproject-link.bst b/tests/format/junctions/duplicates-override-twice-link/subproject/subsubsubproject-link.bst
new file mode 100644
index 000000000..d397fb794
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-twice-link/subproject/subsubsubproject-link.bst
@@ -0,0 +1,4 @@
+kind: link
+
+config:
+ target: subsubproject.bst:subsubsubproject.bst
diff --git a/tests/format/junctions/duplicates-override-twice-link/target.bst b/tests/format/junctions/duplicates-override-twice-link/target.bst
new file mode 100644
index 000000000..efbe3330b
--- /dev/null
+++ b/tests/format/junctions/duplicates-override-twice-link/target.bst
@@ -0,0 +1,5 @@
+kind: stack
+
+depends:
+- subproject.bst:subsubproject.bst:subsubsubproject.bst:target.bst
+- duplicate.bst:target.bst
diff --git a/tests/format/junctions/duplicates-simple-incomplete/project.conf b/tests/format/junctions/duplicates-simple-incomplete/project.conf
new file mode 100644
index 000000000..e7e7d8d63
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-incomplete/project.conf
@@ -0,0 +1,7 @@
+name: test
+min-version: 2.0
+
+junctions:
+ duplicates:
+ subtest:
+ - subproject2.bst
diff --git a/tests/format/junctions/duplicates-simple-incomplete/subproject1.bst b/tests/format/junctions/duplicates-simple-incomplete/subproject1.bst
new file mode 100644
index 000000000..bfd692d00
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-incomplete/subproject1.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject1
diff --git a/tests/format/junctions/duplicates-simple-incomplete/subproject1/project.conf b/tests/format/junctions/duplicates-simple-incomplete/subproject1/project.conf
new file mode 100644
index 000000000..39a53e2ab
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-incomplete/subproject1/project.conf
@@ -0,0 +1,2 @@
+name: subtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-simple-incomplete/subproject1/sub.txt b/tests/format/junctions/duplicates-simple-incomplete/subproject1/sub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-incomplete/subproject1/sub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-simple-incomplete/subproject1/target.bst b/tests/format/junctions/duplicates-simple-incomplete/subproject1/target.bst
new file mode 100644
index 000000000..e24d9bbb4
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-incomplete/subproject1/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub.txt
diff --git a/tests/format/junctions/duplicates-simple-incomplete/subproject2.bst b/tests/format/junctions/duplicates-simple-incomplete/subproject2.bst
new file mode 100644
index 000000000..2343652e1
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-incomplete/subproject2.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject2
diff --git a/tests/format/junctions/duplicates-simple-incomplete/subproject2/project.conf b/tests/format/junctions/duplicates-simple-incomplete/subproject2/project.conf
new file mode 100644
index 000000000..39a53e2ab
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-incomplete/subproject2/project.conf
@@ -0,0 +1,2 @@
+name: subtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-simple-incomplete/subproject2/sub2.txt b/tests/format/junctions/duplicates-simple-incomplete/subproject2/sub2.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-incomplete/subproject2/sub2.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-simple-incomplete/subproject2/target.bst b/tests/format/junctions/duplicates-simple-incomplete/subproject2/target.bst
new file mode 100644
index 000000000..a1d15e942
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-incomplete/subproject2/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub2.txt
diff --git a/tests/format/junctions/duplicates-simple-incomplete/target.bst b/tests/format/junctions/duplicates-simple-incomplete/target.bst
new file mode 100644
index 000000000..fd4734b99
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-incomplete/target.bst
@@ -0,0 +1,5 @@
+kind: stack
+
+depends:
+- subproject1.bst:target.bst
+- subproject2.bst:target.bst
diff --git a/tests/format/junctions/duplicates-simple-link/project.conf b/tests/format/junctions/duplicates-simple-link/project.conf
new file mode 100644
index 000000000..1e1ebae69
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-link/project.conf
@@ -0,0 +1,8 @@
+name: test
+min-version: 2.0
+
+junctions:
+ duplicates:
+ subtest:
+ - subproject1.bst
+ - subproject2-link.bst
diff --git a/tests/format/junctions/duplicates-simple-link/subproject1.bst b/tests/format/junctions/duplicates-simple-link/subproject1.bst
new file mode 100644
index 000000000..bfd692d00
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-link/subproject1.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject1
diff --git a/tests/format/junctions/duplicates-simple-link/subproject1/project.conf b/tests/format/junctions/duplicates-simple-link/subproject1/project.conf
new file mode 100644
index 000000000..39a53e2ab
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-link/subproject1/project.conf
@@ -0,0 +1,2 @@
+name: subtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-simple-link/subproject1/sub.txt b/tests/format/junctions/duplicates-simple-link/subproject1/sub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-link/subproject1/sub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-simple-link/subproject1/target.bst b/tests/format/junctions/duplicates-simple-link/subproject1/target.bst
new file mode 100644
index 000000000..e24d9bbb4
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-link/subproject1/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub.txt
diff --git a/tests/format/junctions/duplicates-simple-link/subproject2-link.bst b/tests/format/junctions/duplicates-simple-link/subproject2-link.bst
new file mode 100644
index 000000000..a8aebfa2c
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-link/subproject2-link.bst
@@ -0,0 +1,4 @@
+kind: link
+
+config:
+ target: subproject2.bst
diff --git a/tests/format/junctions/duplicates-simple-link/subproject2.bst b/tests/format/junctions/duplicates-simple-link/subproject2.bst
new file mode 100644
index 000000000..2343652e1
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-link/subproject2.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject2
diff --git a/tests/format/junctions/duplicates-simple-link/subproject2/project.conf b/tests/format/junctions/duplicates-simple-link/subproject2/project.conf
new file mode 100644
index 000000000..39a53e2ab
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-link/subproject2/project.conf
@@ -0,0 +1,2 @@
+name: subtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-simple-link/subproject2/sub2.txt b/tests/format/junctions/duplicates-simple-link/subproject2/sub2.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-link/subproject2/sub2.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-simple-link/subproject2/target.bst b/tests/format/junctions/duplicates-simple-link/subproject2/target.bst
new file mode 100644
index 000000000..a1d15e942
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-link/subproject2/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub2.txt
diff --git a/tests/format/junctions/duplicates-simple-link/target.bst b/tests/format/junctions/duplicates-simple-link/target.bst
new file mode 100644
index 000000000..b674ed66c
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-link/target.bst
@@ -0,0 +1,5 @@
+kind: stack
+
+depends:
+- subproject1.bst:target.bst
+- subproject2-link.bst:target.bst
diff --git a/tests/format/junctions/duplicates-simple-not-found/project.conf b/tests/format/junctions/duplicates-simple-not-found/project.conf
new file mode 100644
index 000000000..793c6bf9b
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-not-found/project.conf
@@ -0,0 +1,8 @@
+name: test
+min-version: 2.0
+
+junctions:
+ duplicates:
+ subtest:
+ - subproject1.bst
+ - subproject5.bst
diff --git a/tests/format/junctions/duplicates-simple-not-found/subproject1.bst b/tests/format/junctions/duplicates-simple-not-found/subproject1.bst
new file mode 100644
index 000000000..bfd692d00
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-not-found/subproject1.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject1
diff --git a/tests/format/junctions/duplicates-simple-not-found/subproject1/project.conf b/tests/format/junctions/duplicates-simple-not-found/subproject1/project.conf
new file mode 100644
index 000000000..39a53e2ab
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-not-found/subproject1/project.conf
@@ -0,0 +1,2 @@
+name: subtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-simple-not-found/subproject1/sub.txt b/tests/format/junctions/duplicates-simple-not-found/subproject1/sub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-not-found/subproject1/sub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-simple-not-found/subproject1/target.bst b/tests/format/junctions/duplicates-simple-not-found/subproject1/target.bst
new file mode 100644
index 000000000..e24d9bbb4
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-not-found/subproject1/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub.txt
diff --git a/tests/format/junctions/duplicates-simple-not-found/subproject2.bst b/tests/format/junctions/duplicates-simple-not-found/subproject2.bst
new file mode 100644
index 000000000..2343652e1
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-not-found/subproject2.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject2
diff --git a/tests/format/junctions/duplicates-simple-not-found/subproject2/project.conf b/tests/format/junctions/duplicates-simple-not-found/subproject2/project.conf
new file mode 100644
index 000000000..39a53e2ab
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-not-found/subproject2/project.conf
@@ -0,0 +1,2 @@
+name: subtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-simple-not-found/subproject2/sub2.txt b/tests/format/junctions/duplicates-simple-not-found/subproject2/sub2.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-not-found/subproject2/sub2.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-simple-not-found/subproject2/target.bst b/tests/format/junctions/duplicates-simple-not-found/subproject2/target.bst
new file mode 100644
index 000000000..a1d15e942
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-not-found/subproject2/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub2.txt
diff --git a/tests/format/junctions/duplicates-simple-not-found/target.bst b/tests/format/junctions/duplicates-simple-not-found/target.bst
new file mode 100644
index 000000000..fd4734b99
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple-not-found/target.bst
@@ -0,0 +1,5 @@
+kind: stack
+
+depends:
+- subproject1.bst:target.bst
+- subproject2.bst:target.bst
diff --git a/tests/format/junctions/duplicates-simple/project.conf b/tests/format/junctions/duplicates-simple/project.conf
new file mode 100644
index 000000000..3f5ac145d
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple/project.conf
@@ -0,0 +1,8 @@
+name: test
+min-version: 2.0
+
+junctions:
+ duplicates:
+ subtest:
+ - subproject1.bst
+ - subproject2.bst
diff --git a/tests/format/junctions/duplicates-simple/subproject1.bst b/tests/format/junctions/duplicates-simple/subproject1.bst
new file mode 100644
index 000000000..bfd692d00
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple/subproject1.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject1
diff --git a/tests/format/junctions/duplicates-simple/subproject1/project.conf b/tests/format/junctions/duplicates-simple/subproject1/project.conf
new file mode 100644
index 000000000..39a53e2ab
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple/subproject1/project.conf
@@ -0,0 +1,2 @@
+name: subtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-simple/subproject1/sub.txt b/tests/format/junctions/duplicates-simple/subproject1/sub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple/subproject1/sub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-simple/subproject1/target.bst b/tests/format/junctions/duplicates-simple/subproject1/target.bst
new file mode 100644
index 000000000..e24d9bbb4
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple/subproject1/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub.txt
diff --git a/tests/format/junctions/duplicates-simple/subproject2.bst b/tests/format/junctions/duplicates-simple/subproject2.bst
new file mode 100644
index 000000000..2343652e1
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple/subproject2.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject2
diff --git a/tests/format/junctions/duplicates-simple/subproject2/project.conf b/tests/format/junctions/duplicates-simple/subproject2/project.conf
new file mode 100644
index 000000000..39a53e2ab
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple/subproject2/project.conf
@@ -0,0 +1,2 @@
+name: subtest
+min-version: 2.0
diff --git a/tests/format/junctions/duplicates-simple/subproject2/sub2.txt b/tests/format/junctions/duplicates-simple/subproject2/sub2.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple/subproject2/sub2.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/duplicates-simple/subproject2/target.bst b/tests/format/junctions/duplicates-simple/subproject2/target.bst
new file mode 100644
index 000000000..a1d15e942
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple/subproject2/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub2.txt
diff --git a/tests/format/junctions/duplicates-simple/target.bst b/tests/format/junctions/duplicates-simple/target.bst
new file mode 100644
index 000000000..fd4734b99
--- /dev/null
+++ b/tests/format/junctions/duplicates-simple/target.bst
@@ -0,0 +1,5 @@
+kind: stack
+
+depends:
+- subproject1.bst:target.bst
+- subproject2.bst:target.bst
diff --git a/tests/format/junctions/foo/app.bst b/tests/format/junctions/foo/app.bst
deleted file mode 100644
index e658628b0..000000000
--- a/tests/format/junctions/foo/app.bst
+++ /dev/null
@@ -1,7 +0,0 @@
-kind: import
-sources:
-- kind: local
- path: foo.txt
-depends:
-- junction: base.bst
- filename: target.bst
diff --git a/tests/format/junctions/foo/foo.txt b/tests/format/junctions/foo/foo.txt
deleted file mode 100644
index 257cc5642..000000000
--- a/tests/format/junctions/foo/foo.txt
+++ /dev/null
@@ -1 +0,0 @@
-foo
diff --git a/tests/format/junctions/full-path/element-full-path-notfound.bst b/tests/format/junctions/full-path/element-full-path-notfound.bst
new file mode 100644
index 000000000..8797b1d93
--- /dev/null
+++ b/tests/format/junctions/full-path/element-full-path-notfound.bst
@@ -0,0 +1,3 @@
+kind: stack
+depends:
+- subproject.bst:subsubproject.bst:pony.bst
diff --git a/tests/format/junctions/full-path/element-full-path.bst b/tests/format/junctions/full-path/element-full-path.bst
new file mode 100644
index 000000000..b483ef466
--- /dev/null
+++ b/tests/format/junctions/full-path/element-full-path.bst
@@ -0,0 +1,3 @@
+kind: stack
+depends:
+- subproject.bst:subsubproject.bst:subsubsubproject.bst:target.bst
diff --git a/tests/format/junctions/full-path/junction-full-path-notfound.bst b/tests/format/junctions/full-path/junction-full-path-notfound.bst
new file mode 100644
index 000000000..7d2cb8da7
--- /dev/null
+++ b/tests/format/junctions/full-path/junction-full-path-notfound.bst
@@ -0,0 +1,4 @@
+kind: stack
+depends:
+- junction: subproject.bst:subsubproject.bst
+ filename: pony.bst
diff --git a/tests/format/junctions/full-path/junction-full-path.bst b/tests/format/junctions/full-path/junction-full-path.bst
new file mode 100644
index 000000000..dc8aa3af5
--- /dev/null
+++ b/tests/format/junctions/full-path/junction-full-path.bst
@@ -0,0 +1,4 @@
+kind: stack
+depends:
+- junction: subproject.bst:subsubproject.bst:subsubsubproject.bst
+ filename: target.bst
diff --git a/tests/format/junctions/full-path/project.conf b/tests/format/junctions/full-path/project.conf
new file mode 100644
index 000000000..20636c446
--- /dev/null
+++ b/tests/format/junctions/full-path/project.conf
@@ -0,0 +1,2 @@
+name: test
+min-version: 2.0
diff --git a/tests/format/junctions/full-path/subproject.bst b/tests/format/junctions/full-path/subproject.bst
new file mode 100644
index 000000000..c88189cb0
--- /dev/null
+++ b/tests/format/junctions/full-path/subproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject
diff --git a/tests/format/junctions/full-path/subproject/project.conf b/tests/format/junctions/full-path/subproject/project.conf
new file mode 100644
index 000000000..39a53e2ab
--- /dev/null
+++ b/tests/format/junctions/full-path/subproject/project.conf
@@ -0,0 +1,2 @@
+name: subtest
+min-version: 2.0
diff --git a/tests/format/junctions/full-path/subproject/sub.txt b/tests/format/junctions/full-path/subproject/sub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/full-path/subproject/sub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/full-path/subproject/subsubproject.bst b/tests/format/junctions/full-path/subproject/subsubproject.bst
new file mode 100644
index 000000000..f535ab0e0
--- /dev/null
+++ b/tests/format/junctions/full-path/subproject/subsubproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subsubproject
diff --git a/tests/format/junctions/full-path/subproject/subsubproject/project.conf b/tests/format/junctions/full-path/subproject/subsubproject/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/full-path/subproject/subsubproject/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/full-path/subproject/subsubproject/subsub.txt b/tests/format/junctions/full-path/subproject/subsubproject/subsub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/full-path/subproject/subsubproject/subsub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject.bst b/tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject.bst
new file mode 100644
index 000000000..bce64597b
--- /dev/null
+++ b/tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subsubsubproject
diff --git a/tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject/project.conf b/tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject/project.conf
new file mode 100644
index 000000000..e508da808
--- /dev/null
+++ b/tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject/project.conf
@@ -0,0 +1,2 @@
+name: subsubsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject/subsubsub.txt b/tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject/subsubsub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject/subsubsub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject/target.bst b/tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject/target.bst
new file mode 100644
index 000000000..351c9a22d
--- /dev/null
+++ b/tests/format/junctions/full-path/subproject/subsubproject/subsubsubproject/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: subsubsub.txt
diff --git a/tests/format/junctions/full-path/subproject/subsubproject/target.bst b/tests/format/junctions/full-path/subproject/subsubproject/target.bst
new file mode 100644
index 000000000..afafac601
--- /dev/null
+++ b/tests/format/junctions/full-path/subproject/subsubproject/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: subsub.txt
diff --git a/tests/format/junctions/full-path/subproject/target.bst b/tests/format/junctions/full-path/subproject/target.bst
new file mode 100644
index 000000000..e24d9bbb4
--- /dev/null
+++ b/tests/format/junctions/full-path/subproject/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub.txt
diff --git a/tests/format/junctions/inconsistent-names/elements/junction-A.bst b/tests/format/junctions/inconsistent-names/elements/junction-A.bst
deleted file mode 100644
index 74079f990..000000000
--- a/tests/format/junctions/inconsistent-names/elements/junction-A.bst
+++ /dev/null
@@ -1,4 +0,0 @@
-kind: junction
-sources:
-- kind: local
- path: junctionA
diff --git a/tests/format/junctions/inconsistent-names/elements/junction-B-diff-name.bst b/tests/format/junctions/inconsistent-names/elements/junction-B-diff-name.bst
deleted file mode 100644
index 3b33406e5..000000000
--- a/tests/format/junctions/inconsistent-names/elements/junction-B-diff-name.bst
+++ /dev/null
@@ -1,4 +0,0 @@
-kind: junction
-sources:
-- kind: local
- path: junctionA/junctionB
diff --git a/tests/format/junctions/inconsistent-names/elements/target.bst b/tests/format/junctions/inconsistent-names/elements/target.bst
deleted file mode 100644
index 7eba141de..000000000
--- a/tests/format/junctions/inconsistent-names/elements/target.bst
+++ /dev/null
@@ -1,9 +0,0 @@
-kind: import
-sources:
-- kind: local
- path: files/foo
-depends:
-- filename: lib2.bst
- junction: junction-B-diff-name.bst
-- filename: lib.bst
- junction: junction-A.bst
diff --git a/tests/format/junctions/inconsistent-names/files/foo b/tests/format/junctions/inconsistent-names/files/foo
deleted file mode 100644
index e69de29bb..000000000
--- a/tests/format/junctions/inconsistent-names/files/foo
+++ /dev/null
diff --git a/tests/format/junctions/inconsistent-names/junctionA/elements/app.bst b/tests/format/junctions/inconsistent-names/junctionA/elements/app.bst
deleted file mode 100644
index 473aaee0b..000000000
--- a/tests/format/junctions/inconsistent-names/junctionA/elements/app.bst
+++ /dev/null
@@ -1,6 +0,0 @@
-kind: import
-sources:
-- kind: local
- path: files/app
-depends:
-- lib.bst
diff --git a/tests/format/junctions/inconsistent-names/junctionA/elements/junction-B.bst b/tests/format/junctions/inconsistent-names/junctionA/elements/junction-B.bst
deleted file mode 100644
index bc66d7851..000000000
--- a/tests/format/junctions/inconsistent-names/junctionA/elements/junction-B.bst
+++ /dev/null
@@ -1,4 +0,0 @@
-kind: junction
-sources:
-- kind: local
- path: junctionB
diff --git a/tests/format/junctions/inconsistent-names/junctionA/elements/lib.bst b/tests/format/junctions/inconsistent-names/junctionA/elements/lib.bst
deleted file mode 100644
index 684a64315..000000000
--- a/tests/format/junctions/inconsistent-names/junctionA/elements/lib.bst
+++ /dev/null
@@ -1,7 +0,0 @@
-kind: import
-sources:
-- kind: local
- path: files/lib
-depends:
-- filename: base.bst
- junction: junction-B.bst
diff --git a/tests/format/junctions/inconsistent-names/junctionA/files/app b/tests/format/junctions/inconsistent-names/junctionA/files/app
deleted file mode 100644
index e69de29bb..000000000
--- a/tests/format/junctions/inconsistent-names/junctionA/files/app
+++ /dev/null
diff --git a/tests/format/junctions/inconsistent-names/junctionA/files/lib b/tests/format/junctions/inconsistent-names/junctionA/files/lib
deleted file mode 100644
index e69de29bb..000000000
--- a/tests/format/junctions/inconsistent-names/junctionA/files/lib
+++ /dev/null
diff --git a/tests/format/junctions/inconsistent-names/junctionA/junctionB/base/baseimg b/tests/format/junctions/inconsistent-names/junctionA/junctionB/base/baseimg
deleted file mode 100644
index e69de29bb..000000000
--- a/tests/format/junctions/inconsistent-names/junctionA/junctionB/base/baseimg
+++ /dev/null
diff --git a/tests/format/junctions/inconsistent-names/junctionA/junctionB/elements/lib2.bst b/tests/format/junctions/inconsistent-names/junctionA/junctionB/elements/lib2.bst
deleted file mode 100644
index 5a7c17b99..000000000
--- a/tests/format/junctions/inconsistent-names/junctionA/junctionB/elements/lib2.bst
+++ /dev/null
@@ -1,6 +0,0 @@
-kind: import
-sources:
-- kind: local
- path: files/lib2
-depends:
-- base.bst
diff --git a/tests/format/junctions/inconsistent-names/junctionA/junctionB/files/lib2 b/tests/format/junctions/inconsistent-names/junctionA/junctionB/files/lib2
deleted file mode 100644
index e69de29bb..000000000
--- a/tests/format/junctions/inconsistent-names/junctionA/junctionB/files/lib2
+++ /dev/null
diff --git a/tests/format/junctions/inconsistent-names/junctionA/junctionB/project.conf b/tests/format/junctions/inconsistent-names/junctionA/junctionB/project.conf
deleted file mode 100644
index 6bdff02c5..000000000
--- a/tests/format/junctions/inconsistent-names/junctionA/junctionB/project.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-# Unique project name
-name: projectB
-
-# Minimum required BuildStream version
-min-version: 2.0
-
-# Subdirectory where elements are stored
-element-path: elements
diff --git a/tests/format/junctions/inconsistent-names/junctionA/project.conf b/tests/format/junctions/inconsistent-names/junctionA/project.conf
deleted file mode 100644
index 8af914819..000000000
--- a/tests/format/junctions/inconsistent-names/junctionA/project.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-# Unique project name
-name: projectA
-
-# Minimum required BuildStream version
-min-version: 2.0
-
-# Subdirectory where elements are stored
-element-path: elements
diff --git a/tests/format/junctions/inconsistent-names/project.conf b/tests/format/junctions/inconsistent-names/project.conf
deleted file mode 100644
index 8eef10e76..000000000
--- a/tests/format/junctions/inconsistent-names/project.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-# Unique project name
-name: inconsistent-names
-
-# Minimum required BuildStream version
-min-version: 2.0
-
-# Subdirectory where elements are stored
-element-path: elements
diff --git a/tests/format/junctions/internal-and-conflict/project.conf b/tests/format/junctions/internal-and-conflict/project.conf
new file mode 100644
index 000000000..20636c446
--- /dev/null
+++ b/tests/format/junctions/internal-and-conflict/project.conf
@@ -0,0 +1,2 @@
+name: test
+min-version: 2.0
diff --git a/tests/format/junctions/internal-and-conflict/subproject.bst b/tests/format/junctions/internal-and-conflict/subproject.bst
new file mode 100644
index 000000000..c88189cb0
--- /dev/null
+++ b/tests/format/junctions/internal-and-conflict/subproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject
diff --git a/tests/format/junctions/internal-and-conflict/subproject/project.conf b/tests/format/junctions/internal-and-conflict/subproject/project.conf
new file mode 100644
index 000000000..1d44ec886
--- /dev/null
+++ b/tests/format/junctions/internal-and-conflict/subproject/project.conf
@@ -0,0 +1,6 @@
+name: subtest
+min-version: 2.0
+
+junctions:
+ internal:
+ - subsubproject.bst
diff --git a/tests/format/junctions/internal-and-conflict/subproject/subsubproject.bst b/tests/format/junctions/internal-and-conflict/subproject/subsubproject.bst
new file mode 100644
index 000000000..f535ab0e0
--- /dev/null
+++ b/tests/format/junctions/internal-and-conflict/subproject/subsubproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subsubproject
diff --git a/tests/format/junctions/internal-and-conflict/subproject/subsubproject/project.conf b/tests/format/junctions/internal-and-conflict/subproject/subsubproject/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/internal-and-conflict/subproject/subsubproject/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/internal-and-conflict/subproject/subsubproject/subsub.txt b/tests/format/junctions/internal-and-conflict/subproject/subsubproject/subsub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/internal-and-conflict/subproject/subsubproject/subsub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/internal-and-conflict/subproject/subsubproject/target.bst b/tests/format/junctions/internal-and-conflict/subproject/subsubproject/target.bst
new file mode 100644
index 000000000..afafac601
--- /dev/null
+++ b/tests/format/junctions/internal-and-conflict/subproject/subsubproject/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: subsub.txt
diff --git a/tests/format/junctions/internal-and-conflict/subproject/subtarget.bst b/tests/format/junctions/internal-and-conflict/subproject/subtarget.bst
new file mode 100644
index 000000000..5e6a76bac
--- /dev/null
+++ b/tests/format/junctions/internal-and-conflict/subproject/subtarget.bst
@@ -0,0 +1,10 @@
+kind: compose
+
+# Use a build dependency on our internal subsubproject target.
+#
+# There is currently no validation for this but it may be
+# introduced in the future. For correctness of this test,
+# use a build dependency.
+#
+build-depends:
+- subsubproject.bst:target.bst
diff --git a/tests/format/junctions/internal-and-conflict/subsubproject-again.bst b/tests/format/junctions/internal-and-conflict/subsubproject-again.bst
new file mode 100644
index 000000000..308642704
--- /dev/null
+++ b/tests/format/junctions/internal-and-conflict/subsubproject-again.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subsubproject-again
diff --git a/tests/format/junctions/internal-and-conflict/subsubproject-again/project.conf b/tests/format/junctions/internal-and-conflict/subsubproject-again/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/internal-and-conflict/subsubproject-again/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/internal-and-conflict/subsubproject-again/subsub-again.txt b/tests/format/junctions/internal-and-conflict/subsubproject-again/subsub-again.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/internal-and-conflict/subsubproject-again/subsub-again.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/internal-and-conflict/subsubproject-again/target.bst b/tests/format/junctions/internal-and-conflict/subsubproject-again/target.bst
new file mode 100644
index 000000000..1a90211de
--- /dev/null
+++ b/tests/format/junctions/internal-and-conflict/subsubproject-again/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: subsub-again.txt
diff --git a/tests/format/junctions/internal-and-conflict/subsubproject-conflict.bst b/tests/format/junctions/internal-and-conflict/subsubproject-conflict.bst
new file mode 100644
index 000000000..e4715ea1d
--- /dev/null
+++ b/tests/format/junctions/internal-and-conflict/subsubproject-conflict.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subsubproject-conflict
diff --git a/tests/format/junctions/internal-and-conflict/subsubproject-conflict/project.conf b/tests/format/junctions/internal-and-conflict/subsubproject-conflict/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/internal-and-conflict/subsubproject-conflict/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/internal-and-conflict/subsubproject-conflict/subsub-again.txt b/tests/format/junctions/internal-and-conflict/subsubproject-conflict/subsub-again.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/internal-and-conflict/subsubproject-conflict/subsub-again.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/internal-and-conflict/subsubproject-conflict/target.bst b/tests/format/junctions/internal-and-conflict/subsubproject-conflict/target.bst
new file mode 100644
index 000000000..1a90211de
--- /dev/null
+++ b/tests/format/junctions/internal-and-conflict/subsubproject-conflict/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: subsub-again.txt
diff --git a/tests/format/junctions/internal-and-conflict/target.bst b/tests/format/junctions/internal-and-conflict/target.bst
new file mode 100644
index 000000000..5e661e6ba
--- /dev/null
+++ b/tests/format/junctions/internal-and-conflict/target.bst
@@ -0,0 +1,6 @@
+kind: stack
+
+depends:
+- subproject.bst:subtarget.bst
+- subsubproject-again.bst:target.bst
+- subsubproject-conflict.bst:target.bst
diff --git a/tests/format/junctions/internal-double/project.conf b/tests/format/junctions/internal-double/project.conf
new file mode 100644
index 000000000..20636c446
--- /dev/null
+++ b/tests/format/junctions/internal-double/project.conf
@@ -0,0 +1,2 @@
+name: test
+min-version: 2.0
diff --git a/tests/format/junctions/internal-double/subproject1.bst b/tests/format/junctions/internal-double/subproject1.bst
new file mode 100644
index 000000000..bfd692d00
--- /dev/null
+++ b/tests/format/junctions/internal-double/subproject1.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject1
diff --git a/tests/format/junctions/internal-double/subproject1/project.conf b/tests/format/junctions/internal-double/subproject1/project.conf
new file mode 100644
index 000000000..d82152220
--- /dev/null
+++ b/tests/format/junctions/internal-double/subproject1/project.conf
@@ -0,0 +1,6 @@
+name: subtest1
+min-version: 2.0
+
+junctions:
+ internal:
+ - subsubproject.bst
diff --git a/tests/format/junctions/internal-double/subproject1/subsubproject.bst b/tests/format/junctions/internal-double/subproject1/subsubproject.bst
new file mode 100644
index 000000000..f535ab0e0
--- /dev/null
+++ b/tests/format/junctions/internal-double/subproject1/subsubproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subsubproject
diff --git a/tests/format/junctions/internal-double/subproject1/subsubproject/project.conf b/tests/format/junctions/internal-double/subproject1/subsubproject/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/internal-double/subproject1/subsubproject/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/internal-double/subproject1/subsubproject/subsub1.txt b/tests/format/junctions/internal-double/subproject1/subsubproject/subsub1.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/internal-double/subproject1/subsubproject/subsub1.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/internal-double/subproject1/subsubproject/target.bst b/tests/format/junctions/internal-double/subproject1/subsubproject/target.bst
new file mode 100644
index 000000000..2d631ebba
--- /dev/null
+++ b/tests/format/junctions/internal-double/subproject1/subsubproject/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: subsub1.txt
diff --git a/tests/format/junctions/internal-double/subproject1/subtarget.bst b/tests/format/junctions/internal-double/subproject1/subtarget.bst
new file mode 100644
index 000000000..5e6a76bac
--- /dev/null
+++ b/tests/format/junctions/internal-double/subproject1/subtarget.bst
@@ -0,0 +1,10 @@
+kind: compose
+
+# Use a build dependency on our internal subsubproject target.
+#
+# There is currently no validation for this but it may be
+# introduced in the future. For correctness of this test,
+# use a build dependency.
+#
+build-depends:
+- subsubproject.bst:target.bst
diff --git a/tests/format/junctions/internal-double/subproject2.bst b/tests/format/junctions/internal-double/subproject2.bst
new file mode 100644
index 000000000..2343652e1
--- /dev/null
+++ b/tests/format/junctions/internal-double/subproject2.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject2
diff --git a/tests/format/junctions/internal-double/subproject2/project.conf b/tests/format/junctions/internal-double/subproject2/project.conf
new file mode 100644
index 000000000..8ed6c717a
--- /dev/null
+++ b/tests/format/junctions/internal-double/subproject2/project.conf
@@ -0,0 +1,6 @@
+name: subtest2
+min-version: 2.0
+
+junctions:
+ internal:
+ - subsubproject.bst
diff --git a/tests/format/junctions/internal-double/subproject2/subsubproject.bst b/tests/format/junctions/internal-double/subproject2/subsubproject.bst
new file mode 100644
index 000000000..f535ab0e0
--- /dev/null
+++ b/tests/format/junctions/internal-double/subproject2/subsubproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subsubproject
diff --git a/tests/format/junctions/internal-double/subproject2/subsubproject/project.conf b/tests/format/junctions/internal-double/subproject2/subsubproject/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/internal-double/subproject2/subsubproject/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/internal-double/subproject2/subsubproject/subsub2.txt b/tests/format/junctions/internal-double/subproject2/subsubproject/subsub2.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/internal-double/subproject2/subsubproject/subsub2.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/internal-double/subproject2/subsubproject/target.bst b/tests/format/junctions/internal-double/subproject2/subsubproject/target.bst
new file mode 100644
index 000000000..5cfa4e453
--- /dev/null
+++ b/tests/format/junctions/internal-double/subproject2/subsubproject/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: subsub2.txt
diff --git a/tests/format/junctions/internal-double/subproject2/subtarget.bst b/tests/format/junctions/internal-double/subproject2/subtarget.bst
new file mode 100644
index 000000000..5e6a76bac
--- /dev/null
+++ b/tests/format/junctions/internal-double/subproject2/subtarget.bst
@@ -0,0 +1,10 @@
+kind: compose
+
+# Use a build dependency on our internal subsubproject target.
+#
+# There is currently no validation for this but it may be
+# introduced in the future. For correctness of this test,
+# use a build dependency.
+#
+build-depends:
+- subsubproject.bst:target.bst
diff --git a/tests/format/junctions/internal-double/subsubproject-again.bst b/tests/format/junctions/internal-double/subsubproject-again.bst
new file mode 100644
index 000000000..308642704
--- /dev/null
+++ b/tests/format/junctions/internal-double/subsubproject-again.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subsubproject-again
diff --git a/tests/format/junctions/internal-double/subsubproject-again/project.conf b/tests/format/junctions/internal-double/subsubproject-again/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/internal-double/subsubproject-again/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/internal-double/subsubproject-again/subsub-again.txt b/tests/format/junctions/internal-double/subsubproject-again/subsub-again.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/internal-double/subsubproject-again/subsub-again.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/internal-double/subsubproject-again/target.bst b/tests/format/junctions/internal-double/subsubproject-again/target.bst
new file mode 100644
index 000000000..1a90211de
--- /dev/null
+++ b/tests/format/junctions/internal-double/subsubproject-again/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: subsub-again.txt
diff --git a/tests/format/junctions/internal-double/target.bst b/tests/format/junctions/internal-double/target.bst
new file mode 100644
index 000000000..b579466d5
--- /dev/null
+++ b/tests/format/junctions/internal-double/target.bst
@@ -0,0 +1,6 @@
+kind: stack
+
+depends:
+- subproject1.bst:subtarget.bst
+- subproject2.bst:subtarget.bst
+- subsubproject-again.bst:target.bst
diff --git a/tests/format/junctions/internal-link/project.conf b/tests/format/junctions/internal-link/project.conf
new file mode 100644
index 000000000..20636c446
--- /dev/null
+++ b/tests/format/junctions/internal-link/project.conf
@@ -0,0 +1,2 @@
+name: test
+min-version: 2.0
diff --git a/tests/format/junctions/internal-link/subproject.bst b/tests/format/junctions/internal-link/subproject.bst
new file mode 100644
index 000000000..c88189cb0
--- /dev/null
+++ b/tests/format/junctions/internal-link/subproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject
diff --git a/tests/format/junctions/internal-link/subproject/project.conf b/tests/format/junctions/internal-link/subproject/project.conf
new file mode 100644
index 000000000..ac5810334
--- /dev/null
+++ b/tests/format/junctions/internal-link/subproject/project.conf
@@ -0,0 +1,6 @@
+name: subtest
+min-version: 2.0
+
+junctions:
+ internal:
+ - subsubproject-link.bst
diff --git a/tests/format/junctions/internal-link/subproject/subsubproject-link.bst b/tests/format/junctions/internal-link/subproject/subsubproject-link.bst
new file mode 100644
index 000000000..246a5e41c
--- /dev/null
+++ b/tests/format/junctions/internal-link/subproject/subsubproject-link.bst
@@ -0,0 +1,4 @@
+kind: link
+
+config:
+ target: subsubproject.bst
diff --git a/tests/format/junctions/internal-link/subproject/subsubproject.bst b/tests/format/junctions/internal-link/subproject/subsubproject.bst
new file mode 100644
index 000000000..f535ab0e0
--- /dev/null
+++ b/tests/format/junctions/internal-link/subproject/subsubproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subsubproject
diff --git a/tests/format/junctions/internal-link/subproject/subsubproject/project.conf b/tests/format/junctions/internal-link/subproject/subsubproject/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/internal-link/subproject/subsubproject/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/internal-link/subproject/subsubproject/subsub.txt b/tests/format/junctions/internal-link/subproject/subsubproject/subsub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/internal-link/subproject/subsubproject/subsub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/internal-link/subproject/subsubproject/target.bst b/tests/format/junctions/internal-link/subproject/subsubproject/target.bst
new file mode 100644
index 000000000..afafac601
--- /dev/null
+++ b/tests/format/junctions/internal-link/subproject/subsubproject/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: subsub.txt
diff --git a/tests/format/junctions/internal-link/subproject/subtarget.bst b/tests/format/junctions/internal-link/subproject/subtarget.bst
new file mode 100644
index 000000000..5e6a76bac
--- /dev/null
+++ b/tests/format/junctions/internal-link/subproject/subtarget.bst
@@ -0,0 +1,10 @@
+kind: compose
+
+# Use a build dependency on our internal subsubproject target.
+#
+# There is currently no validation for this but it may be
+# introduced in the future. For correctness of this test,
+# use a build dependency.
+#
+build-depends:
+- subsubproject.bst:target.bst
diff --git a/tests/format/junctions/internal-link/subsubproject-again.bst b/tests/format/junctions/internal-link/subsubproject-again.bst
new file mode 100644
index 000000000..308642704
--- /dev/null
+++ b/tests/format/junctions/internal-link/subsubproject-again.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subsubproject-again
diff --git a/tests/format/junctions/internal-link/subsubproject-again/project.conf b/tests/format/junctions/internal-link/subsubproject-again/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/internal-link/subsubproject-again/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/internal-link/subsubproject-again/subsub-again.txt b/tests/format/junctions/internal-link/subsubproject-again/subsub-again.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/internal-link/subsubproject-again/subsub-again.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/internal-link/subsubproject-again/target.bst b/tests/format/junctions/internal-link/subsubproject-again/target.bst
new file mode 100644
index 000000000..1a90211de
--- /dev/null
+++ b/tests/format/junctions/internal-link/subsubproject-again/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: subsub-again.txt
diff --git a/tests/format/junctions/internal-link/target.bst b/tests/format/junctions/internal-link/target.bst
new file mode 100644
index 000000000..bc8944592
--- /dev/null
+++ b/tests/format/junctions/internal-link/target.bst
@@ -0,0 +1,5 @@
+kind: stack
+
+depends:
+- subproject.bst:subtarget.bst
+- subsubproject-again.bst:target.bst
diff --git a/tests/format/junctions/internal-override/project.conf b/tests/format/junctions/internal-override/project.conf
new file mode 100644
index 000000000..20636c446
--- /dev/null
+++ b/tests/format/junctions/internal-override/project.conf
@@ -0,0 +1,2 @@
+name: test
+min-version: 2.0
diff --git a/tests/format/junctions/internal-override/subproject.bst b/tests/format/junctions/internal-override/subproject.bst
new file mode 100644
index 000000000..db1dd6253
--- /dev/null
+++ b/tests/format/junctions/internal-override/subproject.bst
@@ -0,0 +1,8 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject
+
+config:
+ overrides:
+ subsubproject.bst: subsubproject-override.bst
diff --git a/tests/format/junctions/internal-override/subproject/project.conf b/tests/format/junctions/internal-override/subproject/project.conf
new file mode 100644
index 000000000..1d44ec886
--- /dev/null
+++ b/tests/format/junctions/internal-override/subproject/project.conf
@@ -0,0 +1,6 @@
+name: subtest
+min-version: 2.0
+
+junctions:
+ internal:
+ - subsubproject.bst
diff --git a/tests/format/junctions/internal-override/subproject/subsubproject.bst b/tests/format/junctions/internal-override/subproject/subsubproject.bst
new file mode 100644
index 000000000..f535ab0e0
--- /dev/null
+++ b/tests/format/junctions/internal-override/subproject/subsubproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subsubproject
diff --git a/tests/format/junctions/internal-override/subproject/subsubproject/project.conf b/tests/format/junctions/internal-override/subproject/subsubproject/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/internal-override/subproject/subsubproject/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/internal-override/subproject/subsubproject/subsub.txt b/tests/format/junctions/internal-override/subproject/subsubproject/subsub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/internal-override/subproject/subsubproject/subsub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/internal-override/subproject/subsubproject/target.bst b/tests/format/junctions/internal-override/subproject/subsubproject/target.bst
new file mode 100644
index 000000000..afafac601
--- /dev/null
+++ b/tests/format/junctions/internal-override/subproject/subsubproject/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: subsub.txt
diff --git a/tests/format/junctions/internal-override/subproject/subtarget.bst b/tests/format/junctions/internal-override/subproject/subtarget.bst
new file mode 100644
index 000000000..5e6a76bac
--- /dev/null
+++ b/tests/format/junctions/internal-override/subproject/subtarget.bst
@@ -0,0 +1,10 @@
+kind: compose
+
+# Use a build dependency on our internal subsubproject target.
+#
+# There is currently no validation for this but it may be
+# introduced in the future. For correctness of this test,
+# use a build dependency.
+#
+build-depends:
+- subsubproject.bst:target.bst
diff --git a/tests/format/junctions/internal-override/subsubproject-again.bst b/tests/format/junctions/internal-override/subsubproject-again.bst
new file mode 100644
index 000000000..308642704
--- /dev/null
+++ b/tests/format/junctions/internal-override/subsubproject-again.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subsubproject-again
diff --git a/tests/format/junctions/internal-override/subsubproject-again/project.conf b/tests/format/junctions/internal-override/subsubproject-again/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/internal-override/subsubproject-again/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/internal-override/subsubproject-again/subsub-again.txt b/tests/format/junctions/internal-override/subsubproject-again/subsub-again.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/internal-override/subsubproject-again/subsub-again.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/internal-override/subsubproject-again/target.bst b/tests/format/junctions/internal-override/subsubproject-again/target.bst
new file mode 100644
index 000000000..1a90211de
--- /dev/null
+++ b/tests/format/junctions/internal-override/subsubproject-again/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: subsub-again.txt
diff --git a/tests/format/junctions/internal-override/subsubproject-override.bst b/tests/format/junctions/internal-override/subsubproject-override.bst
new file mode 100644
index 000000000..a5e47cdc6
--- /dev/null
+++ b/tests/format/junctions/internal-override/subsubproject-override.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subsubproject-override
diff --git a/tests/format/junctions/internal-override/subsubproject-override/project.conf b/tests/format/junctions/internal-override/subsubproject-override/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/internal-override/subsubproject-override/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/internal-override/subsubproject-override/subsub-override.txt b/tests/format/junctions/internal-override/subsubproject-override/subsub-override.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/internal-override/subsubproject-override/subsub-override.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/internal-override/subsubproject-override/target.bst b/tests/format/junctions/internal-override/subsubproject-override/target.bst
new file mode 100644
index 000000000..ae732d025
--- /dev/null
+++ b/tests/format/junctions/internal-override/subsubproject-override/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: subsub-override.txt
diff --git a/tests/format/junctions/internal-override/target.bst b/tests/format/junctions/internal-override/target.bst
new file mode 100644
index 000000000..bc8944592
--- /dev/null
+++ b/tests/format/junctions/internal-override/target.bst
@@ -0,0 +1,5 @@
+kind: stack
+
+depends:
+- subproject.bst:subtarget.bst
+- subsubproject-again.bst:target.bst
diff --git a/tests/format/junctions/internal-simple/project.conf b/tests/format/junctions/internal-simple/project.conf
new file mode 100644
index 000000000..20636c446
--- /dev/null
+++ b/tests/format/junctions/internal-simple/project.conf
@@ -0,0 +1,2 @@
+name: test
+min-version: 2.0
diff --git a/tests/format/junctions/internal-simple/subproject.bst b/tests/format/junctions/internal-simple/subproject.bst
new file mode 100644
index 000000000..c88189cb0
--- /dev/null
+++ b/tests/format/junctions/internal-simple/subproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject
diff --git a/tests/format/junctions/internal-simple/subproject/project.conf b/tests/format/junctions/internal-simple/subproject/project.conf
new file mode 100644
index 000000000..1d44ec886
--- /dev/null
+++ b/tests/format/junctions/internal-simple/subproject/project.conf
@@ -0,0 +1,6 @@
+name: subtest
+min-version: 2.0
+
+junctions:
+ internal:
+ - subsubproject.bst
diff --git a/tests/format/junctions/internal-simple/subproject/subsubproject.bst b/tests/format/junctions/internal-simple/subproject/subsubproject.bst
new file mode 100644
index 000000000..f535ab0e0
--- /dev/null
+++ b/tests/format/junctions/internal-simple/subproject/subsubproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subsubproject
diff --git a/tests/format/junctions/internal-simple/subproject/subsubproject/project.conf b/tests/format/junctions/internal-simple/subproject/subsubproject/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/internal-simple/subproject/subsubproject/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/internal-simple/subproject/subsubproject/subsub.txt b/tests/format/junctions/internal-simple/subproject/subsubproject/subsub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/internal-simple/subproject/subsubproject/subsub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/internal-simple/subproject/subsubproject/target.bst b/tests/format/junctions/internal-simple/subproject/subsubproject/target.bst
new file mode 100644
index 000000000..afafac601
--- /dev/null
+++ b/tests/format/junctions/internal-simple/subproject/subsubproject/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: subsub.txt
diff --git a/tests/format/junctions/internal-simple/subproject/subtarget.bst b/tests/format/junctions/internal-simple/subproject/subtarget.bst
new file mode 100644
index 000000000..5e6a76bac
--- /dev/null
+++ b/tests/format/junctions/internal-simple/subproject/subtarget.bst
@@ -0,0 +1,10 @@
+kind: compose
+
+# Use a build dependency on our internal subsubproject target.
+#
+# There is currently no validation for this but it may be
+# introduced in the future. For correctness of this test,
+# use a build dependency.
+#
+build-depends:
+- subsubproject.bst:target.bst
diff --git a/tests/format/junctions/internal-simple/subsubproject-again.bst b/tests/format/junctions/internal-simple/subsubproject-again.bst
new file mode 100644
index 000000000..308642704
--- /dev/null
+++ b/tests/format/junctions/internal-simple/subsubproject-again.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subsubproject-again
diff --git a/tests/format/junctions/internal-simple/subsubproject-again/project.conf b/tests/format/junctions/internal-simple/subsubproject-again/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/internal-simple/subsubproject-again/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/internal-simple/subsubproject-again/subsub-again.txt b/tests/format/junctions/internal-simple/subsubproject-again/subsub-again.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/internal-simple/subsubproject-again/subsub-again.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/internal-simple/subsubproject-again/target.bst b/tests/format/junctions/internal-simple/subsubproject-again/target.bst
new file mode 100644
index 000000000..1a90211de
--- /dev/null
+++ b/tests/format/junctions/internal-simple/subsubproject-again/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: subsub-again.txt
diff --git a/tests/format/junctions/internal-simple/target.bst b/tests/format/junctions/internal-simple/target.bst
new file mode 100644
index 000000000..bc8944592
--- /dev/null
+++ b/tests/format/junctions/internal-simple/target.bst
@@ -0,0 +1,5 @@
+kind: stack
+
+depends:
+- subproject.bst:subtarget.bst
+- subsubproject-again.bst:target.bst
diff --git a/tests/format/junctions/base/base.txt b/tests/format/junctions/invalid/base/base.txt
index a496efee8..a496efee8 100644
--- a/tests/format/junctions/base/base.txt
+++ b/tests/format/junctions/invalid/base/base.txt
diff --git a/tests/format/junctions/base/project.conf b/tests/format/junctions/invalid/base/project.conf
index 7e258e29f..7e258e29f 100644
--- a/tests/format/junctions/base/project.conf
+++ b/tests/format/junctions/invalid/base/project.conf
diff --git a/tests/format/junctions/base/target.bst b/tests/format/junctions/invalid/base/target.bst
index 2b61c518b..2b61c518b 100644
--- a/tests/format/junctions/base/target.bst
+++ b/tests/format/junctions/invalid/base/target.bst
diff --git a/tests/format/junctions/invalid/missing-element.bst b/tests/format/junctions/invalid/missing-element.bst
deleted file mode 100644
index 4c29221af..000000000
--- a/tests/format/junctions/invalid/missing-element.bst
+++ /dev/null
@@ -1,9 +0,0 @@
-# This refers to the `foo.bst` element through
-# the `base.bst` junction. The `base.bst` junction
-# exists but the `foo.bst` element does not exist
-# in the subproject.
-#
-kind: stack
-depends:
-- junction: base.bst
- filename: foo.bst
diff --git a/tests/format/junctions/invalid/subproject-self-override.bst b/tests/format/junctions/invalid/subproject-self-override.bst
new file mode 100644
index 000000000..22a8b3db8
--- /dev/null
+++ b/tests/format/junctions/invalid/subproject-self-override.bst
@@ -0,0 +1,16 @@
+kind: junction
+sources:
+- kind: local
+ path: base
+
+#
+# In this case, the "base" subproject does not really
+# have a subproject to override, but we're using this
+# setup to test the error of overriding a subproject
+# with the junction declaring the override, which will
+# happen sooner than noticing there is not a subproject.bst
+# to override.
+#
+config:
+ overrides:
+ subproject.bst: subproject-self-override.bst
diff --git a/tests/format/junctions/invalid/target-self-override.bst b/tests/format/junctions/invalid/target-self-override.bst
new file mode 100644
index 000000000..0f7b65676
--- /dev/null
+++ b/tests/format/junctions/invalid/target-self-override.bst
@@ -0,0 +1,4 @@
+kind: stack
+
+depends:
+- subproject-self-override.bst:target.bst
diff --git a/tests/format/junctions/invalid/missing.bst b/tests/format/junctions/missing-element/bad-junction.bst
index 672e967fe..672e967fe 100644
--- a/tests/format/junctions/invalid/missing.bst
+++ b/tests/format/junctions/missing-element/bad-junction.bst
diff --git a/tests/format/junctions/nested/deeptarget.bst b/tests/format/junctions/nested/deeptarget.bst
new file mode 100644
index 000000000..8d7aae29d
--- /dev/null
+++ b/tests/format/junctions/nested/deeptarget.bst
@@ -0,0 +1,6 @@
+kind: stack
+
+depends:
+- subproject.bst:target.bst
+- subproject.bst:subtarget.bst
+- subproject.bst:subsubtarget.bst
diff --git a/tests/format/junctions/nested/foo.bst b/tests/format/junctions/nested/foo.bst
deleted file mode 100644
index 1feb4010b..000000000
--- a/tests/format/junctions/nested/foo.bst
+++ /dev/null
@@ -1,4 +0,0 @@
-kind: junction
-sources:
-- kind: local
- path: foo
diff --git a/tests/format/junctions/nested/project.conf b/tests/format/junctions/nested/project.conf
index eba806781..20636c446 100644
--- a/tests/format/junctions/nested/project.conf
+++ b/tests/format/junctions/nested/project.conf
@@ -1,2 +1,2 @@
-name: nested
+name: test
min-version: 2.0
diff --git a/tests/format/junctions/nested/subproject.bst b/tests/format/junctions/nested/subproject.bst
new file mode 100644
index 000000000..c88189cb0
--- /dev/null
+++ b/tests/format/junctions/nested/subproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject
diff --git a/tests/format/junctions/nested/subproject/project.conf b/tests/format/junctions/nested/subproject/project.conf
new file mode 100644
index 000000000..39a53e2ab
--- /dev/null
+++ b/tests/format/junctions/nested/subproject/project.conf
@@ -0,0 +1,2 @@
+name: subtest
+min-version: 2.0
diff --git a/tests/format/junctions/nested/subproject/sub.txt b/tests/format/junctions/nested/subproject/sub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/nested/subproject/sub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/nested/subproject/subsubproject.bst b/tests/format/junctions/nested/subproject/subsubproject.bst
new file mode 100644
index 000000000..f535ab0e0
--- /dev/null
+++ b/tests/format/junctions/nested/subproject/subsubproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subsubproject
diff --git a/tests/format/junctions/nested/subproject/subsubproject/project.conf b/tests/format/junctions/nested/subproject/subsubproject/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/nested/subproject/subsubproject/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/nested/subproject/subsubproject/subsub.txt b/tests/format/junctions/nested/subproject/subsubproject/subsub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/nested/subproject/subsubproject/subsub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/nested/subproject/subsubproject/subsubsubproject.bst b/tests/format/junctions/nested/subproject/subsubproject/subsubsubproject.bst
new file mode 100644
index 000000000..bce64597b
--- /dev/null
+++ b/tests/format/junctions/nested/subproject/subsubproject/subsubsubproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subsubsubproject
diff --git a/tests/format/junctions/nested/subproject/subsubproject/subsubsubproject/project.conf b/tests/format/junctions/nested/subproject/subsubproject/subsubsubproject/project.conf
new file mode 100644
index 000000000..e508da808
--- /dev/null
+++ b/tests/format/junctions/nested/subproject/subsubproject/subsubsubproject/project.conf
@@ -0,0 +1,2 @@
+name: subsubsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/nested/subproject/subsubproject/subsubsubproject/subsubsub.txt b/tests/format/junctions/nested/subproject/subsubproject/subsubsubproject/subsubsub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/nested/subproject/subsubproject/subsubsubproject/subsubsub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/nested/subproject/subsubproject/subsubsubproject/target.bst b/tests/format/junctions/nested/subproject/subsubproject/subsubsubproject/target.bst
new file mode 100644
index 000000000..351c9a22d
--- /dev/null
+++ b/tests/format/junctions/nested/subproject/subsubproject/subsubsubproject/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: subsubsub.txt
diff --git a/tests/format/junctions/nested/subproject/subsubproject/subtarget.bst b/tests/format/junctions/nested/subproject/subsubproject/subtarget.bst
new file mode 100644
index 000000000..b6fea5b2a
--- /dev/null
+++ b/tests/format/junctions/nested/subproject/subsubproject/subtarget.bst
@@ -0,0 +1,4 @@
+kind: stack
+
+depends:
+- subsubsubproject.bst:target.bst
diff --git a/tests/format/junctions/nested/subproject/subsubproject/target.bst b/tests/format/junctions/nested/subproject/subsubproject/target.bst
new file mode 100644
index 000000000..afafac601
--- /dev/null
+++ b/tests/format/junctions/nested/subproject/subsubproject/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: subsub.txt
diff --git a/tests/format/junctions/nested/subproject/subsubtarget.bst b/tests/format/junctions/nested/subproject/subsubtarget.bst
new file mode 100644
index 000000000..050e0118c
--- /dev/null
+++ b/tests/format/junctions/nested/subproject/subsubtarget.bst
@@ -0,0 +1,4 @@
+kind: stack
+
+depends:
+- subsubproject.bst:subtarget.bst
diff --git a/tests/format/junctions/nested/subproject/subtarget.bst b/tests/format/junctions/nested/subproject/subtarget.bst
new file mode 100644
index 000000000..c4549b373
--- /dev/null
+++ b/tests/format/junctions/nested/subproject/subtarget.bst
@@ -0,0 +1,4 @@
+kind: stack
+
+depends:
+- subsubproject.bst:target.bst
diff --git a/tests/format/junctions/nested/subproject/target.bst b/tests/format/junctions/nested/subproject/target.bst
new file mode 100644
index 000000000..e24d9bbb4
--- /dev/null
+++ b/tests/format/junctions/nested/subproject/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub.txt
diff --git a/tests/format/junctions/nested/target.bst b/tests/format/junctions/nested/target.bst
index db59499a7..32bbc75bc 100644
--- a/tests/format/junctions/nested/target.bst
+++ b/tests/format/junctions/nested/target.bst
@@ -1,4 +1,5 @@
kind: stack
+
depends:
-- junction: foo.bst
- filename: target.bst
+- subproject.bst:target.bst
+- subproject.bst:subtarget.bst
diff --git a/tests/format/junctions/options-default/project.conf b/tests/format/junctions/options-default/project.conf
deleted file mode 100644
index c362c12b6..000000000
--- a/tests/format/junctions/options-default/project.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-name: options-default
-min-version: 2.0
diff --git a/tests/format/junctions/options-inherit/project.conf b/tests/format/junctions/options-inherit/project.conf
deleted file mode 100644
index b5680a792..000000000
--- a/tests/format/junctions/options-inherit/project.conf
+++ /dev/null
@@ -1,11 +0,0 @@
-name: options-inherit
-min-version: 2.0
-options:
- animal:
- type: enum
- description: The kind of animal
- values:
- - pony
- - horsy
- default: horsy
- variable: animal
diff --git a/tests/format/junctions/options-default/base.bst b/tests/format/junctions/options/base-default.bst
index 5d42e5c31..5d42e5c31 100644
--- a/tests/format/junctions/options-default/base.bst
+++ b/tests/format/junctions/options/base-default.bst
diff --git a/tests/format/junctions/options/base.bst b/tests/format/junctions/options/base-explicit.bst
index a100e5e1e..a100e5e1e 100644
--- a/tests/format/junctions/options/base.bst
+++ b/tests/format/junctions/options/base-explicit.bst
diff --git a/tests/format/junctions/options-inherit/base.bst b/tests/format/junctions/options/base-propagate.bst
index 8623d0d01..8623d0d01 100644
--- a/tests/format/junctions/options-inherit/base.bst
+++ b/tests/format/junctions/options/base-propagate.bst
diff --git a/tests/format/junctions/options-base/horsy.txt b/tests/format/junctions/options/options-base/horsy.txt
index 063dad656..063dad656 100644
--- a/tests/format/junctions/options-base/horsy.txt
+++ b/tests/format/junctions/options/options-base/horsy.txt
diff --git a/tests/format/junctions/options-base/pony.txt b/tests/format/junctions/options/options-base/pony.txt
index f62144808..f62144808 100644
--- a/tests/format/junctions/options-base/pony.txt
+++ b/tests/format/junctions/options/options-base/pony.txt
diff --git a/tests/format/junctions/options-base/project.conf b/tests/format/junctions/options/options-base/project.conf
index 58bfa55e5..58bfa55e5 100644
--- a/tests/format/junctions/options-base/project.conf
+++ b/tests/format/junctions/options/options-base/project.conf
diff --git a/tests/format/junctions/options-base/target.bst b/tests/format/junctions/options/options-base/target.bst
index cda17af98..cda17af98 100644
--- a/tests/format/junctions/options-base/target.bst
+++ b/tests/format/junctions/options/options-base/target.bst
diff --git a/tests/format/junctions/options-inherit/target.bst b/tests/format/junctions/options/target-default.bst
index 8395c0c77..6de0bb89d 100644
--- a/tests/format/junctions/options-inherit/target.bst
+++ b/tests/format/junctions/options/target-default.bst
@@ -1,4 +1,4 @@
kind: stack
depends:
-- junction: base.bst
+- junction: base-default.bst
filename: target.bst
diff --git a/tests/format/junctions/options/target.bst b/tests/format/junctions/options/target-explicit.bst
index 8395c0c77..25d923b8e 100644
--- a/tests/format/junctions/options/target.bst
+++ b/tests/format/junctions/options/target-explicit.bst
@@ -1,4 +1,4 @@
kind: stack
depends:
-- junction: base.bst
+- junction: base-explicit.bst
filename: target.bst
diff --git a/tests/format/junctions/foo/target.bst b/tests/format/junctions/options/target-propagate.bst
index 70b78a3fc..7f2f4b798 100644
--- a/tests/format/junctions/foo/target.bst
+++ b/tests/format/junctions/options/target-propagate.bst
@@ -1,5 +1,4 @@
kind: stack
depends:
-- junction: base.bst
+- junction: base-propagate.bst
filename: target.bst
-- app.bst
diff --git a/tests/format/junctions/bar/base.bst b/tests/format/junctions/override-twice/override.bst
index 10ce559a9..c0564b631 100644
--- a/tests/format/junctions/bar/base.bst
+++ b/tests/format/junctions/override-twice/override.bst
@@ -1,4 +1,4 @@
kind: junction
sources:
- kind: local
- path: base
+ path: override
diff --git a/tests/format/junctions/override-twice/override/overridden-again.txt b/tests/format/junctions/override-twice/override/overridden-again.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/override-twice/override/overridden-again.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/override-twice/override/project.conf b/tests/format/junctions/override-twice/override/project.conf
new file mode 100644
index 000000000..e508da808
--- /dev/null
+++ b/tests/format/junctions/override-twice/override/project.conf
@@ -0,0 +1,2 @@
+name: subsubsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/override-twice/override/target.bst b/tests/format/junctions/override-twice/override/target.bst
new file mode 100644
index 000000000..c05396c42
--- /dev/null
+++ b/tests/format/junctions/override-twice/override/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: overridden-again.txt
diff --git a/tests/format/junctions/override-twice/project.conf b/tests/format/junctions/override-twice/project.conf
new file mode 100644
index 000000000..20636c446
--- /dev/null
+++ b/tests/format/junctions/override-twice/project.conf
@@ -0,0 +1,2 @@
+name: test
+min-version: 2.0
diff --git a/tests/format/junctions/override-twice/subproject.bst b/tests/format/junctions/override-twice/subproject.bst
new file mode 100644
index 000000000..297dbe90d
--- /dev/null
+++ b/tests/format/junctions/override-twice/subproject.bst
@@ -0,0 +1,8 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject
+
+config:
+ overrides:
+ subsubproject.bst:subsubsubproject.bst: override.bst
diff --git a/tests/format/junctions/conflict/bar.bst b/tests/format/junctions/override-twice/subproject/override.bst
index 62eee825a..c0564b631 100644
--- a/tests/format/junctions/conflict/bar.bst
+++ b/tests/format/junctions/override-twice/subproject/override.bst
@@ -1,4 +1,4 @@
kind: junction
sources:
- kind: local
- path: bar
+ path: override
diff --git a/tests/format/junctions/override-twice/subproject/override/overridden.txt b/tests/format/junctions/override-twice/subproject/override/overridden.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/override-twice/subproject/override/overridden.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/override-twice/subproject/override/project.conf b/tests/format/junctions/override-twice/subproject/override/project.conf
new file mode 100644
index 000000000..e508da808
--- /dev/null
+++ b/tests/format/junctions/override-twice/subproject/override/project.conf
@@ -0,0 +1,2 @@
+name: subsubsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/override-twice/subproject/override/target.bst b/tests/format/junctions/override-twice/subproject/override/target.bst
new file mode 100644
index 000000000..8a725bab6
--- /dev/null
+++ b/tests/format/junctions/override-twice/subproject/override/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: overridden.txt
diff --git a/tests/format/junctions/override-twice/subproject/project.conf b/tests/format/junctions/override-twice/subproject/project.conf
new file mode 100644
index 000000000..39a53e2ab
--- /dev/null
+++ b/tests/format/junctions/override-twice/subproject/project.conf
@@ -0,0 +1,2 @@
+name: subtest
+min-version: 2.0
diff --git a/tests/format/junctions/override-twice/subproject/subsubproject.bst b/tests/format/junctions/override-twice/subproject/subsubproject.bst
new file mode 100644
index 000000000..fd5101878
--- /dev/null
+++ b/tests/format/junctions/override-twice/subproject/subsubproject.bst
@@ -0,0 +1,8 @@
+kind: junction
+sources:
+- kind: local
+ path: subsubproject
+
+config:
+ overrides:
+ subsubsubproject.bst: override.bst
diff --git a/tests/format/junctions/override-twice/subproject/subsubproject/project.conf b/tests/format/junctions/override-twice/subproject/subsubproject/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/override-twice/subproject/subsubproject/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/override-twice/subproject/subsubproject/subsubsubproject.bst b/tests/format/junctions/override-twice/subproject/subsubproject/subsubsubproject.bst
new file mode 100644
index 000000000..bce64597b
--- /dev/null
+++ b/tests/format/junctions/override-twice/subproject/subsubproject/subsubsubproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subsubsubproject
diff --git a/tests/format/junctions/override-twice/subproject/subsubproject/subsubsubproject/original.txt b/tests/format/junctions/override-twice/subproject/subsubproject/subsubsubproject/original.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/override-twice/subproject/subsubproject/subsubsubproject/original.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/override-twice/subproject/subsubproject/subsubsubproject/project.conf b/tests/format/junctions/override-twice/subproject/subsubproject/subsubsubproject/project.conf
new file mode 100644
index 000000000..e508da808
--- /dev/null
+++ b/tests/format/junctions/override-twice/subproject/subsubproject/subsubsubproject/project.conf
@@ -0,0 +1,2 @@
+name: subsubsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/override-twice/subproject/subsubproject/subsubsubproject/target.bst b/tests/format/junctions/override-twice/subproject/subsubproject/subsubsubproject/target.bst
new file mode 100644
index 000000000..61edc6467
--- /dev/null
+++ b/tests/format/junctions/override-twice/subproject/subsubproject/subsubsubproject/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: original.txt
diff --git a/tests/format/junctions/override-twice/target.bst b/tests/format/junctions/override-twice/target.bst
new file mode 100644
index 000000000..a748441bf
--- /dev/null
+++ b/tests/format/junctions/override-twice/target.bst
@@ -0,0 +1,4 @@
+kind: stack
+
+depends:
+- subproject.bst:subsubproject.bst:subsubsubproject.bst:target.bst
diff --git a/tests/format/junctions/overrides/overridden-subsubproject.bst b/tests/format/junctions/overrides/overridden-subsubproject.bst
new file mode 100644
index 000000000..bb089ab48
--- /dev/null
+++ b/tests/format/junctions/overrides/overridden-subsubproject.bst
@@ -0,0 +1,10 @@
+# This junction resides at the toplevel project
+#
+# It is used to override the subrpoject's junction to
+# the subsubproject, and instead point that to the
+# subsubsubproject.
+#
+kind: junction
+sources:
+- kind: local
+ path: subproject/subsubproject/subsubsubproject
diff --git a/tests/format/junctions/overrides/overridden-subsubsubproject.bst b/tests/format/junctions/overrides/overridden-subsubsubproject.bst
new file mode 100644
index 000000000..ba349d958
--- /dev/null
+++ b/tests/format/junctions/overrides/overridden-subsubsubproject.bst
@@ -0,0 +1,10 @@
+# This junction resides at the toplevel project
+#
+# It is used to override the subrpoject's subsubproject's
+# junction to the subsubsubproject, and instead point that to
+# the surpriseproject.
+#
+kind: junction
+sources:
+- kind: local
+ path: surpriseproject
diff --git a/tests/format/junctions/overrides/project.conf b/tests/format/junctions/overrides/project.conf
new file mode 100644
index 000000000..20636c446
--- /dev/null
+++ b/tests/format/junctions/overrides/project.conf
@@ -0,0 +1,2 @@
+name: test
+min-version: 2.0
diff --git a/tests/format/junctions/overrides/subproject-overriden-with-deep-subproject.bst b/tests/format/junctions/overrides/subproject-overriden-with-deep-subproject.bst
new file mode 100644
index 000000000..f1878c07d
--- /dev/null
+++ b/tests/format/junctions/overrides/subproject-overriden-with-deep-subproject.bst
@@ -0,0 +1,8 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject
+
+config:
+ overrides:
+ subsubproject.bst: surpriseproject.bst:deepsurpriseproject.bst
diff --git a/tests/format/junctions/overrides/subproject-with-deep-override.bst b/tests/format/junctions/overrides/subproject-with-deep-override.bst
new file mode 100644
index 000000000..1be1955a7
--- /dev/null
+++ b/tests/format/junctions/overrides/subproject-with-deep-override.bst
@@ -0,0 +1,8 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject
+
+config:
+ overrides:
+ subsubproject.bst:subsubsubproject.bst: overridden-subsubsubproject.bst
diff --git a/tests/format/junctions/overrides/subproject-with-override.bst b/tests/format/junctions/overrides/subproject-with-override.bst
new file mode 100644
index 000000000..9c3398b2e
--- /dev/null
+++ b/tests/format/junctions/overrides/subproject-with-override.bst
@@ -0,0 +1,8 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject
+
+config:
+ overrides:
+ subsubproject.bst: overridden-subsubproject.bst
diff --git a/tests/format/junctions/overrides/subproject.bst b/tests/format/junctions/overrides/subproject.bst
new file mode 100644
index 000000000..c88189cb0
--- /dev/null
+++ b/tests/format/junctions/overrides/subproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject
diff --git a/tests/format/junctions/overrides/subproject/project.conf b/tests/format/junctions/overrides/subproject/project.conf
new file mode 100644
index 000000000..39a53e2ab
--- /dev/null
+++ b/tests/format/junctions/overrides/subproject/project.conf
@@ -0,0 +1,2 @@
+name: subtest
+min-version: 2.0
diff --git a/tests/format/junctions/overrides/subproject/sub.txt b/tests/format/junctions/overrides/subproject/sub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/overrides/subproject/sub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/overrides/subproject/subsubproject.bst b/tests/format/junctions/overrides/subproject/subsubproject.bst
new file mode 100644
index 000000000..f535ab0e0
--- /dev/null
+++ b/tests/format/junctions/overrides/subproject/subsubproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subsubproject
diff --git a/tests/format/junctions/overrides/subproject/subsubproject/project.conf b/tests/format/junctions/overrides/subproject/subsubproject/project.conf
new file mode 100644
index 000000000..d11bcbb30
--- /dev/null
+++ b/tests/format/junctions/overrides/subproject/subsubproject/project.conf
@@ -0,0 +1,2 @@
+name: subsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/overrides/subproject/subsubproject/subsub.txt b/tests/format/junctions/overrides/subproject/subsubproject/subsub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/overrides/subproject/subsubproject/subsub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/overrides/subproject/subsubproject/subsubsubproject.bst b/tests/format/junctions/overrides/subproject/subsubproject/subsubsubproject.bst
new file mode 100644
index 000000000..bce64597b
--- /dev/null
+++ b/tests/format/junctions/overrides/subproject/subsubproject/subsubsubproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subsubsubproject
diff --git a/tests/format/junctions/overrides/subproject/subsubproject/subsubsubproject/project.conf b/tests/format/junctions/overrides/subproject/subsubproject/subsubsubproject/project.conf
new file mode 100644
index 000000000..e508da808
--- /dev/null
+++ b/tests/format/junctions/overrides/subproject/subsubproject/subsubsubproject/project.conf
@@ -0,0 +1,2 @@
+name: subsubsubtest
+min-version: 2.0
diff --git a/tests/format/junctions/overrides/subproject/subsubproject/subsubsubproject/subsubsub.txt b/tests/format/junctions/overrides/subproject/subsubproject/subsubsubproject/subsubsub.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/overrides/subproject/subsubproject/subsubsubproject/subsubsub.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/overrides/subproject/subsubproject/subsubsubproject/target.bst b/tests/format/junctions/overrides/subproject/subsubproject/subsubsubproject/target.bst
new file mode 100644
index 000000000..351c9a22d
--- /dev/null
+++ b/tests/format/junctions/overrides/subproject/subsubproject/subsubsubproject/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: subsubsub.txt
diff --git a/tests/format/junctions/overrides/subproject/subsubproject/target.bst b/tests/format/junctions/overrides/subproject/subsubproject/target.bst
new file mode 100644
index 000000000..afafac601
--- /dev/null
+++ b/tests/format/junctions/overrides/subproject/subsubproject/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: subsub.txt
diff --git a/tests/format/junctions/overrides/subproject/target.bst b/tests/format/junctions/overrides/subproject/target.bst
new file mode 100644
index 000000000..e24d9bbb4
--- /dev/null
+++ b/tests/format/junctions/overrides/subproject/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: sub.txt
diff --git a/tests/format/junctions/overrides/surpriseproject.bst b/tests/format/junctions/overrides/surpriseproject.bst
new file mode 100644
index 000000000..427c4ebdf
--- /dev/null
+++ b/tests/format/junctions/overrides/surpriseproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: surpriseproject
diff --git a/tests/format/junctions/overrides/surpriseproject/deepsurpriseproject.bst b/tests/format/junctions/overrides/surpriseproject/deepsurpriseproject.bst
new file mode 100644
index 000000000..62423a996
--- /dev/null
+++ b/tests/format/junctions/overrides/surpriseproject/deepsurpriseproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: deepsurpriseproject
diff --git a/tests/format/junctions/overrides/surpriseproject/deepsurpriseproject/deepsurprise.txt b/tests/format/junctions/overrides/surpriseproject/deepsurpriseproject/deepsurprise.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/overrides/surpriseproject/deepsurpriseproject/deepsurprise.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/overrides/surpriseproject/deepsurpriseproject/project.conf b/tests/format/junctions/overrides/surpriseproject/deepsurpriseproject/project.conf
new file mode 100644
index 000000000..cf657b17e
--- /dev/null
+++ b/tests/format/junctions/overrides/surpriseproject/deepsurpriseproject/project.conf
@@ -0,0 +1,2 @@
+name: deepsurprise
+min-version: 2.0
diff --git a/tests/format/junctions/overrides/surpriseproject/deepsurpriseproject/target.bst b/tests/format/junctions/overrides/surpriseproject/deepsurpriseproject/target.bst
new file mode 100644
index 000000000..981f29da3
--- /dev/null
+++ b/tests/format/junctions/overrides/surpriseproject/deepsurpriseproject/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: deepsurprise.txt
diff --git a/tests/format/junctions/overrides/surpriseproject/project.conf b/tests/format/junctions/overrides/surpriseproject/project.conf
new file mode 100644
index 000000000..0d812aed4
--- /dev/null
+++ b/tests/format/junctions/overrides/surpriseproject/project.conf
@@ -0,0 +1,2 @@
+name: surprise
+min-version: 2.0
diff --git a/tests/format/junctions/overrides/surpriseproject/surprise.txt b/tests/format/junctions/overrides/surpriseproject/surprise.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/overrides/surpriseproject/surprise.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/overrides/surpriseproject/target.bst b/tests/format/junctions/overrides/surpriseproject/target.bst
new file mode 100644
index 000000000..bc496303e
--- /dev/null
+++ b/tests/format/junctions/overrides/surpriseproject/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: surprise.txt
diff --git a/tests/format/junctions/overrides/target-overridden-subsubproject.bst b/tests/format/junctions/overrides/target-overridden-subsubproject.bst
new file mode 100644
index 000000000..18610631a
--- /dev/null
+++ b/tests/format/junctions/overrides/target-overridden-subsubproject.bst
@@ -0,0 +1,12 @@
+kind: stack
+
+# Here we depend on the target in subproject's subsubproject,
+# however we've overridden the subproject's subsubproject with
+# our own.
+#
+# We should still be able to address that overridden subproject
+# and access the project we've overridden it with, which will
+# turn out to be the subsubsubproject.
+#
+depends:
+- subproject-with-override.bst:subsubproject.bst:target.bst
diff --git a/tests/format/junctions/overrides/target-overridden-subsubsubproject.bst b/tests/format/junctions/overrides/target-overridden-subsubsubproject.bst
new file mode 100644
index 000000000..5c5437b7a
--- /dev/null
+++ b/tests/format/junctions/overrides/target-overridden-subsubsubproject.bst
@@ -0,0 +1,8 @@
+kind: stack
+
+# Here we depend on the target in subproject's subsubproject's
+# subsubsubproject, however we've overridden the subproject's
+# subsubproject's subsubsubproject with our own surprise project
+#
+depends:
+- subproject-with-deep-override.bst:subsubproject.bst:subsubsubproject.bst:target.bst
diff --git a/tests/format/junctions/overrides/target-overridden-with-deepsubproject.bst b/tests/format/junctions/overrides/target-overridden-with-deepsubproject.bst
new file mode 100644
index 000000000..bf5240906
--- /dev/null
+++ b/tests/format/junctions/overrides/target-overridden-with-deepsubproject.bst
@@ -0,0 +1,4 @@
+kind: stack
+
+depends:
+- subproject-overriden-with-deep-subproject.bst:subsubproject.bst:target.bst
diff --git a/tests/format/junctions/simple/project.conf b/tests/format/junctions/simple/project.conf
new file mode 100644
index 000000000..20636c446
--- /dev/null
+++ b/tests/format/junctions/simple/project.conf
@@ -0,0 +1,2 @@
+name: test
+min-version: 2.0
diff --git a/tests/format/junctions/simple/subproject.bst b/tests/format/junctions/simple/subproject.bst
new file mode 100644
index 000000000..c88189cb0
--- /dev/null
+++ b/tests/format/junctions/simple/subproject.bst
@@ -0,0 +1,4 @@
+kind: junction
+sources:
+- kind: local
+ path: subproject
diff --git a/tests/format/junctions/simple/subproject/base.txt b/tests/format/junctions/simple/subproject/base.txt
new file mode 100644
index 000000000..f73f3093f
--- /dev/null
+++ b/tests/format/junctions/simple/subproject/base.txt
@@ -0,0 +1 @@
+file
diff --git a/tests/format/junctions/simple/subproject/project.conf b/tests/format/junctions/simple/subproject/project.conf
new file mode 100644
index 000000000..39a53e2ab
--- /dev/null
+++ b/tests/format/junctions/simple/subproject/project.conf
@@ -0,0 +1,2 @@
+name: subtest
+min-version: 2.0
diff --git a/tests/format/junctions/simple/subproject/target.bst b/tests/format/junctions/simple/subproject/target.bst
new file mode 100644
index 000000000..2b61c518b
--- /dev/null
+++ b/tests/format/junctions/simple/subproject/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: base.txt
diff --git a/tests/format/junctions/simple/target.bst b/tests/format/junctions/simple/target.bst
new file mode 100644
index 000000000..8ecfd7d56
--- /dev/null
+++ b/tests/format/junctions/simple/target.bst
@@ -0,0 +1,4 @@
+kind: stack
+
+depends:
+- subproject.bst:target.bst
diff --git a/tests/format/junctions/toplevel/bar.bst b/tests/format/junctions/toplevel/bar.bst
deleted file mode 100644
index 62eee825a..000000000
--- a/tests/format/junctions/toplevel/bar.bst
+++ /dev/null
@@ -1,4 +0,0 @@
-kind: junction
-sources:
-- kind: local
- path: bar
diff --git a/tests/format/junctions/toplevel/base.bst b/tests/format/junctions/toplevel/base.bst
deleted file mode 100644
index 10ce559a9..000000000
--- a/tests/format/junctions/toplevel/base.bst
+++ /dev/null
@@ -1,4 +0,0 @@
-kind: junction
-sources:
-- kind: local
- path: base
diff --git a/tests/format/junctions/toplevel/element-full-path-notfound.bst b/tests/format/junctions/toplevel/element-full-path-notfound.bst
deleted file mode 100644
index 55efaca10..000000000
--- a/tests/format/junctions/toplevel/element-full-path-notfound.bst
+++ /dev/null
@@ -1,3 +0,0 @@
-kind: stack
-depends:
-- foo.bst:base.bst:pony.bst
diff --git a/tests/format/junctions/toplevel/element-full-path.bst b/tests/format/junctions/toplevel/element-full-path.bst
deleted file mode 100644
index f58559a76..000000000
--- a/tests/format/junctions/toplevel/element-full-path.bst
+++ /dev/null
@@ -1,3 +0,0 @@
-kind: stack
-depends:
-- foo.bst:base.bst:target.bst
diff --git a/tests/format/junctions/toplevel/foo.bst b/tests/format/junctions/toplevel/foo.bst
deleted file mode 100644
index 1feb4010b..000000000
--- a/tests/format/junctions/toplevel/foo.bst
+++ /dev/null
@@ -1,4 +0,0 @@
-kind: junction
-sources:
-- kind: local
- path: foo
diff --git a/tests/format/junctions/toplevel/junction-full-path-notfound.bst b/tests/format/junctions/toplevel/junction-full-path-notfound.bst
deleted file mode 100644
index a57d6ba76..000000000
--- a/tests/format/junctions/toplevel/junction-full-path-notfound.bst
+++ /dev/null
@@ -1,4 +0,0 @@
-kind: stack
-depends:
-- junction: foo.bst:base.bst
- filename: pony.bst
diff --git a/tests/format/junctions/toplevel/junction-full-path.bst b/tests/format/junctions/toplevel/junction-full-path.bst
deleted file mode 100644
index 4a4f67d19..000000000
--- a/tests/format/junctions/toplevel/junction-full-path.bst
+++ /dev/null
@@ -1,4 +0,0 @@
-kind: stack
-depends:
-- junction: foo.bst:base.bst
- filename: target.bst
diff --git a/tests/format/junctions/toplevel/project.conf b/tests/format/junctions/toplevel/project.conf
deleted file mode 100644
index d35b2b8f8..000000000
--- a/tests/format/junctions/toplevel/project.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-name: toplevel
-min-version: 2.0
diff --git a/tests/format/junctions/toplevel/target.bst b/tests/format/junctions/toplevel/target.bst
deleted file mode 100644
index 5e280e542..000000000
--- a/tests/format/junctions/toplevel/target.bst
+++ /dev/null
@@ -1,6 +0,0 @@
-kind: stack
-depends:
-- junction: foo.bst
- filename: target.bst
-- junction: bar.bst
- filename: target.bst
diff --git a/tests/format/junctions/use-repo/baserepo/base.txt b/tests/format/junctions/use-repo/baserepo/base.txt
new file mode 100644
index 000000000..a496efee8
--- /dev/null
+++ b/tests/format/junctions/use-repo/baserepo/base.txt
@@ -0,0 +1 @@
+This is a text file
diff --git a/tests/format/junctions/use-repo/baserepo/project.conf b/tests/format/junctions/use-repo/baserepo/project.conf
new file mode 100644
index 000000000..7e258e29f
--- /dev/null
+++ b/tests/format/junctions/use-repo/baserepo/project.conf
@@ -0,0 +1,2 @@
+name: base
+min-version: 2.0
diff --git a/tests/format/junctions/use-repo/baserepo/target.bst b/tests/format/junctions/use-repo/baserepo/target.bst
new file mode 100644
index 000000000..2b61c518b
--- /dev/null
+++ b/tests/format/junctions/use-repo/baserepo/target.bst
@@ -0,0 +1,4 @@
+kind: import
+sources:
+- kind: local
+ path: base.txt
diff --git a/tests/format/junctions/foo/project.conf b/tests/format/junctions/use-repo/project.conf
index 43a09bb5e..43a09bb5e 100644
--- a/tests/format/junctions/foo/project.conf
+++ b/tests/format/junctions/use-repo/project.conf
diff --git a/tests/format/junctions/options-default/target.bst b/tests/format/junctions/use-repo/target.bst
index 8395c0c77..8395c0c77 100644
--- a/tests/format/junctions/options-default/target.bst
+++ b/tests/format/junctions/use-repo/target.bst