Skip to content

Commit 32feb71

Browse files
authored
Rollup merge of rust-lang#137540 - yotamofek:pr/more-deprecated-test-directives, r=notriddle
Fix (more) test directives that were accidentally ignored Continuation of rust-lang#137099 , caught by rust-lang#137103 (and needed to unblock that one). These test directives were accidentally using the old (`// ``@`)`` syntax
2 parents 04888af + 0881dba commit 32feb71

File tree

14 files changed

+24
-26
lines changed

14 files changed

+24
-26
lines changed

tests/run-make/rustdoc-scrape-examples-macros/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Scraped example should only include line numbers for items b and c in ex.rs
2-
// @!has foobar/fn.f.html '//*[@class="src-line-numbers"]' '14'
3-
// @has foobar/fn.f.html '//*[@class="src-line-numbers"]' '15'
4-
// @has foobar/fn.f.html '//*[@class="src-line-numbers"]' '21'
5-
// @!has foobar/fn.f.html '//*[@class="src-line-numbers"]' '22'
2+
//@ !has foobar/fn.f.html '//span[@data-nosnippet]' '14'
3+
//@ has foobar/fn.f.html '//span[@data-nosnippet]' '15'
4+
//@ has foobar/fn.f.html '//span[@data-nosnippet]' '21'
5+
//@ !has foobar/fn.f.html '//span[@data-nosnippet]' '22'
66

77
pub fn f() {}
88

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
// @has foobar/fn.ok.html '//*[@class="docblock scraped-example-list"]//*[@class="prev"]' ''
2-
// @has foobar/fn.ok.html '//*[@class="more-scraped-examples"]' ''
3-
// @has src/ex/ex.rs.html
4-
// @has foobar/fn.ok.html '//a[@href="../src/ex/ex.rs.html#2"]' ''
1+
//@ has foobar/fn.ok.html '//*[@class="more-scraped-examples"]' ''
2+
//@ has src/ex/ex.rs.html
3+
//@ has foobar/fn.ok.html '//a[@href="../src/ex/ex.rs.html#2"]' ''
54

65
pub fn ok() {}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// @has foobar/fn.ok.html '//*[@class="docblock scraped-example-list"]' 'ex2'
2-
// @has foobar/fn.ok.html '//*[@class="more-scraped-examples"]' 'ex1'
3-
// @has foobar/fn.ok.html '//*[@class="highlight focus"]' 'ok'
4-
// @has foobar/fn.ok.html '//*[@class="highlight"]' 'ok'
1+
//@ has foobar/fn.ok.html '//*[@class="docblock scraped-example-list"]' 'ex2'
2+
//@ has foobar/fn.ok.html '//*[@class="more-scraped-examples"]' 'ex1'
3+
//@ has foobar/fn.ok.html '//*[@class="highlight focus"]' 'ok'
4+
//@ has foobar/fn.ok.html '//*[@class="highlight"]' 'ok'
55

66
pub fn ok(_x: i32) {}

tests/run-make/rustdoc-scrape-examples-remap/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// @has foobar/b/fn.foo.html '//*[@class="scraped-example expanded"]' 'ex.rs'
2-
// @has foobar/c/fn.foo.html '//*[@class="scraped-example expanded"]' 'ex.rs'
1+
//@ has foobar/b/fn.foo.html '//*[@class="scraped-example expanded"]' 'ex.rs'
2+
//@ has foobar/c/fn.foo.html '//*[@class="scraped-example expanded"]' 'ex.rs'
33

44
#[path = "a.rs"]
55
pub mod b;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
// @has foobar/fn.ok.html '//*[@class="docblock scraped-example-list"]' ''
1+
//@ has foobar/fn.ok.html '//*[@class="docblock scraped-example-list"]' ''
22

33
pub fn ok() {}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
// @has foobar/fn.ok.html '//*[@class="docblock scraped-example-list"]//code' ' '
1+
//@ has foobar/fn.ok.html '//*[@class="docblock scraped-example-list"]//code' ' '
22

33
pub fn ok() {}

tests/run-make/rustdoc-themes/foo.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// @has test.css
2-
// @has foo/struct.Foo.html
3-
// @has - '//*[@name="rustdoc-vars"]/@data-themes' 'test'
1+
//@ has test.css
2+
//@ has foo/struct.Foo.html
3+
//@ has - '//*[@name="rustdoc-vars"]/@data-themes' 'test'
44
pub struct Foo;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// @has foobar/fn.ok.html
1+
//@ has foobar/fn.ok.html
22
pub fn ok() {}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// @has foobar/fn.ok.html
1+
//@ has foobar/fn.ok.html
22
pub fn ok() {}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// @has foobar/fn.ok.html
1+
//@ has foobar/fn.ok.html
22
pub fn ok() {}

0 commit comments

Comments
 (0)