Skip to content

Commit

Permalink
Update doc_auto_cfg test
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jan 20, 2022
1 parent 682ef4d commit fd005f5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/test/rustdoc/doc-auto-cfg.rs
Expand Up @@ -3,6 +3,12 @@
#![crate_name = "foo"]

// @has foo/fn.foo.html
// @has - '//*[@class="item-info"]/*[@class="stab portability"]' 'non-test'
#[cfg(not(test))]
// @has - '//*[@class="item-info"]/*[@class="stab portability"]' 'non-doctest'
#[cfg(not(doctest))]
pub fn foo() {}

// @has foo/fn.bar.html
// @has - '//*[@class="item-info"]/*[@class="stab portability"]' 'doc'
// @!has - '//*[@class="item-info"]/*[@class="stab portability"]' 'test'
#[cfg(any(test, doc))]
pub fn bar() {}

0 comments on commit fd005f5

Please sign in to comment.