1 // ignore-tidy-linelength
3 // First a module with inner documentation
5 // @has issue_55364/subone/index.html
6 // These foo/bar links in the module's documentation should refer inside `subone`
7 // @has - '//section[@id="main"]/div[@class="docblock"]//a[@href="../../issue_55364/subone/fn.foo.html"]' 'foo'
8 // @has - '//section[@id="main"]/div[@class="docblock"]//a[@href="../../issue_55364/subone/fn.bar.html"]' 'bar'
10 //! See either [foo] or [bar].
12 // This should refer to subone's `bar`
13 // @has issue_55364/subone/fn.foo.html
14 // @has - '//section[@id="main"]/div[@class="docblock"]//a[@href="../../issue_55364/subone/fn.bar.html"]' 'bar'
17 // This should refer to subone's `foo`
18 // @has issue_55364/subone/fn.bar.html
19 // @has - '//section[@id="main"]/div[@class="docblock"]//a[@href="../../issue_55364/subone/fn.foo.html"]' 'foo'
24 // A module with outer documentation
26 // @has issue_55364/subtwo/index.html
27 // These foo/bar links in the module's documentation should not reference inside `subtwo`
28 // @!has - '//section[@id="main"]/div[@class="docblock"]//a[@href="../../issue_55364/subtwo/fn.foo.html"]' 'foo'
29 // @!has - '//section[@id="main"]/div[@class="docblock"]//a[@href="../../issue_55364/subtwo/fn.bar.html"]' 'bar'
30 // Instead it should be referencing the top level functions
31 // @has - '//section[@id="main"]/div[@class="docblock"]//a[@href="../../issue_55364/fn.foo.html"]' 'foo'
32 // @has - '//section[@id="main"]/div[@class="docblock"]//a[@href="../../issue_55364/fn.bar.html"]' 'bar'
33 // Though there should be such links later
34 // @has - '//section[@id="main"]/table//tr[@class="module-item"]/td/a[@class="fn"][@href="fn.foo.html"]' 'foo'
35 // @has - '//section[@id="main"]/table//tr[@class="module-item"]/td/a[@class="fn"][@href="fn.bar.html"]' 'bar'
36 /// See either [foo] or [bar].
39 // Despite the module's docs referring to the top level foo/bar,
40 // this should refer to subtwo's `bar`
41 // @has issue_55364/subtwo/fn.foo.html
42 // @has - '//section[@id="main"]/div[@class="docblock"]//a[@href="../../issue_55364/subtwo/fn.bar.html"]' 'bar'
45 // Despite the module's docs referring to the top level foo/bar,
46 // this should refer to subtwo's `foo`
47 // @has issue_55364/subtwo/fn.bar.html
48 // @has - '//section[@id="main"]/div[@class="docblock"]//a[@href="../../issue_55364/subtwo/fn.foo.html"]' 'foo'
53 // These are the function referred to by the module above with outer docs
60 // This module refers to the outer foo/bar by means of `super::`
62 // @has issue_55364/subthree/index.html
63 // This module should also refer to the top level foo/bar
64 // @has - '//section[@id="main"]/div[@class="docblock"]//a[@href="../../issue_55364/fn.foo.html"]' 'foo'
65 // @has - '//section[@id="main"]/div[@class="docblock"]//a[@href="../../issue_55364/fn.bar.html"]' 'bar'
67 //! See either [foo][super::foo] or [bar][super::bar]
70 // Next we go *deeper* - In order to ensure it's not just "this or parent"
71 // we test `crate::` and a `super::super::...` chain
72 // @has issue_55364/subfour/subfive/subsix/subseven/subeight/index.html
73 // @has - '//section[@id="main"]/table//tr[@class="module-item"]/td[@class="docblock-short"]//a[@href="../../../../../../issue_55364/subone/fn.foo.html"]' 'other foo'
74 // @has - '//section[@id="main"]/table//tr[@class="module-item"]/td[@class="docblock-short"]//a[@href="../../../../../../issue_55364/subtwo/fn.bar.html"]' 'other bar'
80 /// See [other foo][crate::subone::foo]
82 /// See [other bar][super::super::super::super::super::subtwo::bar]