Skip to content

Commit e500c44

Browse files
committed
rustdoc: update tests for smarter playground url encoding
1 parent 273254e commit e500c44

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/rustdoc/playground-arg.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
pub fn dummy() {}
1111

1212
// ensure that `extern crate foo;` was inserted into code snips automatically:
13-
// @matches foo/index.html '//a[@class="test-arrow"][@href="https://example.com/?code=%23!%5Ballow(unused)%5D%0Aextern%20crate%20r%23foo%3B%0Afn%20main()%20%7B%0Ause%20foo%3A%3Adummy%3B%0Adummy()%3B%0A%7D&edition=2015"]' "Run"
13+
// @matches foo/index.html '//a[@class="test-arrow"][@href="https://example.com/?code=%23![allow(unused)]%0Aextern+crate+r%23foo;%0Afn+main()+{%0Ause+foo::dummy;%0Adummy();%0A}&edition=2015"]' "Run"

tests/rustdoc/playground.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
//! }
2323
//! ```
2424
25-
// @matches foo/index.html '//a[@class="test-arrow"][@href="https://www.example.com/?code=%23!%5Ballow(unused)%5D%0Afn%20main()%20%7B%0A%20%20%20%20println!(%22Hello%2C%20world!%22)%3B%0A%7D&edition=2015"]' "Run"
26-
// @matches foo/index.html '//a[@class="test-arrow"][@href="https://www.example.com/?code=%23!%5Ballow(unused)%5D%0Afn%20main()%20%7B%0Aprintln!(%22Hello%2C%20world!%22)%3B%0A%7D&edition=2015"]' "Run"
27-
// @matches foo/index.html '//a[@class="test-arrow"][@href="https://www.example.com/?code=%23!%5Ballow(unused)%5D%0A%23!%5Bfeature(something)%5D%0A%0Afn%20main()%20%7B%0A%20%20%20%20println!(%22Hello%2C%20world!%22)%3B%0A%7D&version=nightly&edition=2015"]' "Run"
25+
// @matches foo/index.html '//a[@class="test-arrow"][@href="https://www.example.com/?code=%23![allow(unused)]%0Afn+main()+{%0Aprintln!(%22Hello,+world!%22);%0A}&edition=2015"]' "Run"
26+
// @matches foo/index.html '//a[@class="test-arrow"][@href="https://www.example.com/?code=%23![allow(unused)]%0Afn+main()+{%0A++++println!(%22Hello,+world!%22);%0A}&edition=2015"]' "Run"
27+
// @matches foo/index.html '//a[@class="test-arrow"][@href="https://www.example.com/?code=%23![allow(unused)]%0A%23![feature(something)]%0A%0Afn+main()+{%0A++++println!(%22Hello,+world!%22);%0A}&version=nightly&edition=2015"]' "Run"

0 commit comments

Comments
 (0)