Skip to content

Commit fca28ab

Browse files
* Add test case for cfg(false) on module level
* Fix typo * Remove usage of `!has`
1 parent ce0c17a commit fca28ab

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/rustdoc/cfg-bool.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33

44
// regression test for https://github.com/rust-lang/rust/issues/138112
55

6-
//@ has 'foo/fn.foo.html' '//div[@class="stab portability"]' 'Available nowhere'
6+
//@ has 'foo/index.html'
7+
//@ has - '//*[@class="stab portability"]/@title' 'Available nowhere'
8+
9+
//@ count 'foo/fn.foo.html' '//*[@class="stab portability"]' 1
10+
//@ has 'foo/fn.foo.html' '//*[@class="stab portability"]' 'Available nowhere'
711
#[doc(cfg(false))]
812
pub fn foo() {}
913

10-
// a cfg(true) will simply be ommited, as it is the same as no cfg.
11-
//@ !has 'foo/fn.bar.html' '//div[@class="stab portability"]' ''
14+
// a cfg(true) will simply be omitted, as it is the same as no cfg.
15+
//@ count 'foo/fn.bar.html' '//*[@class="stab portability"]' 0
1216
#[doc(cfg(true))]
1317
pub fn bar() {}

0 commit comments

Comments
 (0)