Skip to content

Commit 0a079f0

Browse files
Add tests for --source-code-external-url option
1 parent 0909f7b commit 0a079f0

File tree

4 files changed

+21
-0
lines changed

4 files changed

+21
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// compile-flags:--Z unstable-options --source-code-external-url hello
2+
3+
pub struct Foo;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
error: option `--source-code-external-url` argument must be an URL
2+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// ignore-tidy-linelength
2+
// compile-flags: -Z unstable-options --source-code-external-url https://a.a
3+
4+
#![crate_name = "foo"]
5+
6+
// @has foo/struct.Foo.html
7+
// @has - '//h1[@class="fqn"]//a[@href="https://a.a/foo/source_code_external_url.rs.html#8"]' '[src]'
8+
pub struct Foo;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// ignore-tidy-linelength
2+
// compile-flags: -Z unstable-options --source-code-external-url https://a.a/
3+
4+
#![crate_name = "foo"]
5+
6+
// @has foo/struct.Foo.html
7+
// @has - '//h1[@class="fqn"]//a[@href="https://a.a/foo/source_code_external_url2.rs.html#8"]' '[src]'
8+
pub struct Foo;

0 commit comments

Comments
 (0)