Skip to content

Commit fb9562f

Browse files
Add tests for rustdoc JSON stdout output
1 parent bf9e637 commit fb9562f

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

tests/rustdoc-ui/json-stdout.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Checks that the `-o -` is generating output to stdout.
2+
3+
//@ compile-flags: -Zunstable-options --output-format=json --output -
4+
//@ check-pass
5+
6+
#![feature(no_core)]
7+
#![no_core]
8+
9+
pub struct Foo;

tests/rustdoc-ui/json-stdout.stdout

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"root":"0:0:2381","crate_version":null,"includes_private":false,"index":{"0:0:2381":{"id":"0:0:2381","crate_id":0,"name":"json_stdout","span":{"filename":"$DIR/json-stdout.rs","begin":[6,0],"end":[9,15]},"visibility":"public","docs":null,"links":{},"attrs":["#![feature(no_core)]","#![no_core]"],"deprecation":null,"inner":{"module":{"is_crate":true,"items":["0:1:2380"],"is_stripped":false}}},"0:1:2380":{"id":"0:1:2380","crate_id":0,"name":"Foo","span":{"filename":"$DIR/json-stdout.rs","begin":[9,0],"end":[9,15]},"visibility":"public","docs":null,"links":{},"attrs":[],"deprecation":null,"inner":{"struct":{"kind":"unit","generics":{"params":[],"where_predicates":[]},"impls":[]}}}},"paths":{"0:0:2381":{"crate_id":0,"path":["json_stdout"],"kind":"module"},"0:1:2380":{"crate_id":0,"path":["json_stdout","Foo"],"kind":"struct"}},"external_crates":{},"format_version":33}

0 commit comments

Comments
 (0)