about summary refs log tree commit diff
path: root/tests/rustdoc/doctest/ignore-sometimes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc/doctest/ignore-sometimes.rs')
-rw-r--r--tests/rustdoc/doctest/ignore-sometimes.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/rustdoc/doctest/ignore-sometimes.rs b/tests/rustdoc/doctest/ignore-sometimes.rs
new file mode 100644
index 00000000000..0f8586d221c
--- /dev/null
+++ b/tests/rustdoc/doctest/ignore-sometimes.rs
@@ -0,0 +1,23 @@
+#![crate_name = "foo"]
+
+// test for https://github.com/rust-lang/rust/issues/141092
+
+//@ has 'foo/fn.f.html' '//a[@title="This example is not tested on wasm"]' 'ⓘ'
+/// Example
+///
+/// ```ignore-wasm
+/// let x = 1;
+/// ```
+pub fn f() {}
+
+//@ has 'foo/fn.g.html' '//a[@title="This example is not tested on wasm or windows"]' 'ⓘ'
+/// ```ignore-wasm,ignore-windows
+/// let x = 1;
+/// ```
+pub fn g() {}
+
+//@ has 'foo/fn.h.html' '//a[@title="This example is not tested on wasm, windows, or unix"]' 'ⓘ'
+/// ```ignore-wasm,ignore-windows,ignore-unix
+/// let x = 1;
+/// ```
+pub fn h() {}