Skip to content

Commit

Permalink
Add test when there is no source code link after version
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jan 25, 2022
1 parent d442a37 commit 066fcb6
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/test/rustdoc/version-separator-without-source.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#![doc(html_no_source)]
#![feature(staged_api)]
#![stable(feature = "bar", since = "1.0")]
#![crate_name = "foo"]

// @has foo/fn.foo.html
// @has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0 · '
// @!has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0 · source · '
#[stable(feature = "bar", since = "1.0")]
pub fn foo() {}

// @has foo/struct.Bar.html
// @has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0 · '
// @!has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0 · source · '
#[stable(feature = "bar", since = "1.0")]
pub struct Bar;

impl Bar {
// @has - '//div[@id="method.bar"]/*[@class="rightside"]' '2.0'
// @!has - '//div[@id="method.bar"]/*[@class="rightside"]' '2.0 ·'
#[stable(feature = "foobar", since = "2.0")]
pub fn bar() {}
}

0 comments on commit 066fcb6

Please sign in to comment.