Add tests for custom_code_classes_in_docs
feature
This commit is contained in:
parent
5515fc88dc
commit
f5561842e3
9 changed files with 268 additions and 27 deletions
28
tests/rustdoc/custom_code_classes.rs
Normal file
28
tests/rustdoc/custom_code_classes.rs
Normal file
|
@ -0,0 +1,28 @@
|
|||
// Test for `custom_code_classes_in_docs` feature.
|
||||
|
||||
#![feature(custom_code_classes_in_docs)]
|
||||
#![crate_name = "foo"]
|
||||
#![feature(no_core)]
|
||||
#![no_core]
|
||||
|
||||
// @has 'foo/struct.Bar.html'
|
||||
// @has - '//*[@id="main-content"]//pre[@class="language-whatever hoho-c"]' 'main;'
|
||||
// @has - '//*[@id="main-content"]//pre[@class="language-whatever2 haha-c"]' 'main;'
|
||||
// @has - '//*[@id="main-content"]//pre[@class="language-whatever4 huhu-c"]' 'main;'
|
||||
|
||||
/// ```{class=hoho-c},whatever
|
||||
/// main;
|
||||
/// ```
|
||||
///
|
||||
/// Testing multiple kinds of orders.
|
||||
///
|
||||
/// ```whatever2 {class=haha-c}
|
||||
/// main;
|
||||
/// ```
|
||||
///
|
||||
/// Testing with multiple "unknown". Only the first should be used.
|
||||
///
|
||||
/// ```whatever4{.huhu-c} whatever5
|
||||
/// main;
|
||||
/// ```
|
||||
pub struct Bar;
|
Loading…
Add table
Add a link
Reference in a new issue