Skip to content

Commit 3868ad5

Browse files
Add tests for --output-to-stdout option
1 parent 668e323 commit 3868ad5

File tree

6 files changed

+26
-0
lines changed

6 files changed

+26
-0
lines changed

tests/rustdoc-ui/json-stdout-2.rs

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Checks that the `--output-to-stdout` option prints to stdout.
2+
3+
//@ compile-flags: -Zunstable-options --output-to-stdout --output-format=json
4+
//@ check-pass
5+
6+
#![no_std]
7+
8+
pub struct Foo;

tests/rustdoc-ui/json-stdout-2.stdout

+4
Large diffs are not rendered by default.

tests/rustdoc-ui/json-stdout-3.rs

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Checks that the `--output-to-stdout` option is unstable.
2+
3+
//@ compile-flags: --output-format=json --output-to-stdout
4+
5+
pub struct Foo;

tests/rustdoc-ui/json-stdout-3.stderr

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
error: the `-Z unstable-options` flag must also be passed to enable the flag `output-to-stdout`
2+

tests/rustdoc-ui/json-stdout.rs

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Checks that the `--output-to-stdout` option is unstable.
2+
3+
//@ compile-flags: --output-format=json --output-to-stdout
4+
5+
pub struct Foo;

tests/rustdoc-ui/json-stdout.stderr

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
error: the `-Z unstable-options` flag must also be passed to enable the flag `output-to-stdout`
2+

0 commit comments

Comments
 (0)