[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
[RUNNING] `[..]/foo-[..][EXE]`
[DOCTEST] foo
-[RUNNING] `rustdoc --test [..]`",
+[RUNNING] `rustdoc [..]--test [..]`",
)
.with_stdout_contains_n("running 0 tests", 2)
.run();
p.cargo("test -v")
.with_stderr_contains(
- "[RUNNING] `rustdoc --test [..] --crate-name foo [..]-L native=bar[..]`",
+ "[RUNNING] `rustdoc [..]--test [..] --crate-name foo [..]-L native=bar[..]`",
)
.run();
}
[RUNNING] `[..]/deps/foo-[..]`
[RUNNING] `[..]/deps/test1-[..]`
[DOCTEST] foo
-[RUNNING] `rustdoc --test [..]
+[RUNNING] `rustdoc [..]--test [..]
").run();
p.cargo("test -vv")
.with_stderr_unordered(
[RUNNING] `[..]/deps/foo-[..]`
[RUNNING] `[..]/deps/test1-[..]`
[DOCTEST] foo
-[RUNNING] `rustdoc --test [..]
+[RUNNING] `rustdoc [..]--test [..]
",
)
.run();
[RUNNING] `[..]/deps/foo-[..]`
[RUNNING] `[..]/deps/test1-[..]`
[DOCTEST] foo
-[RUNNING] `rustdoc --test [..]`
+[RUNNING] `rustdoc [..]--test [..]`
").run();
p.cargo("test --release -vv")
.with_stderr_unordered(
[RUNNING] `[..]/deps/foo-[..]`
[RUNNING] `[..]/deps/test1-[..]`
[DOCTEST] foo
-[RUNNING] `rustdoc --test [..]
+[RUNNING] `rustdoc [..]--test [..]
",
)
.run();
[COMPILING] bar [..]
[DOCUMENTING] bar [..]
[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]link -C codegen-units=1 -C debuginfo=2 [..]
-[RUNNING] `rustdoc --crate-name bar bar/src/lib.rs [..]
+[RUNNING] `rustdoc [..]--crate-name bar bar/src/lib.rs [..]
[RUNNING] `[..] rustc --crate-name bar bar/src/lib.rs [..]--crate-type lib --emit=[..]metadata -C panic=abort -C codegen-units=1 -C debuginfo=2 [..]
[COMPILING] bdep [..]
[RUNNING] `[..] rustc --crate-name bdep bdep/src/lib.rs [..]--crate-type lib --emit=[..]link -C codegen-units=1 -C debuginfo=2 [..]
[RUNNING] `[..]target/debug/build/foo-[..]/build-script-build`
[foo 0.0.1] foo custom build PROFILE=debug DEBUG=true OPT_LEVEL=0
[DOCUMENTING] foo [..]
-[RUNNING] `rustdoc --crate-name foo src/lib.rs [..]
+[RUNNING] `rustdoc [..]--crate-name foo src/lib.rs [..]
[FINISHED] dev [unoptimized + debuginfo] [..]
").run();
}
.with_stderr_contains(
"\
[DOCTEST] foo
-[RUNNING] `rustdoc --test [CWD]/src/lib.rs \
+[RUNNING] `rustdoc [..]--test [CWD]/src/lib.rs \
[..] \
--extern bar=[CWD]/target/debug/deps/libbar-[..].rlib \
--extern baz=[CWD]/target/debug/deps/libbar-[..].rlib \
-use crate::support::{basic_manifest, project};
+use crate::support::{basic_manifest, is_nightly, project};
#[cargo_test]
fn rustdoc_simple() {
.with_stderr(
"\
[DOCUMENTING] foo v0.0.1 ([CWD])
-[RUNNING] `rustdoc --crate-name foo src/lib.rs [..]\
+[RUNNING] `rustdoc [..]--crate-name foo src/lib.rs [..]\
-o [CWD]/target/doc \
[..] \
-L dependency=[CWD]/target/debug/deps`
.with_stderr(
"\
[DOCUMENTING] foo v0.0.1 ([CWD])
-[RUNNING] `rustdoc --crate-name foo src/lib.rs [..]\
+[RUNNING] `rustdoc [..]--crate-name foo src/lib.rs [..]\
-o [CWD]/target/doc \
[..] \
--cfg=foo \
[CHECKING] bar v0.0.1 ([..])
[RUNNING] `rustc [..]bar/src/lib.rs [..]`
[DOCUMENTING] foo v0.0.1 ([CWD])
-[RUNNING] `rustdoc --crate-name foo src/lib.rs [..]\
+[RUNNING] `rustdoc [..]--crate-name foo src/lib.rs [..]\
-o [CWD]/target/doc \
[..] \
--cfg=foo \
.with_stderr(
"\
[DOCUMENTING] bar v0.0.1 ([..])
-[RUNNING] `rustdoc --crate-name bar [..]bar/src/lib.rs [..]\
+[RUNNING] `rustdoc [..]--crate-name bar [..]bar/src/lib.rs [..]\
-o [CWD]/target/doc \
[..] \
--cfg=foo \
.with_stderr(
"\
[DOCUMENTING] foo v0.0.1 ([..])
-[RUNNING] `rustdoc --crate-name foo src/lib.rs [..]\
+[RUNNING] `rustdoc [..]--crate-name foo src/lib.rs [..]\
-o [CWD]/target/doc \
[..] \
--cfg=foo \
.run();
}
+#[cargo_test]
+fn proc_macro_crate_type() {
+ // NOTE - Remove this once 'rustdoc --crate-type'
+ // rides to stable
+ if !is_nightly() {
+ return;
+ }
+ let p = project()
+ .file(
+ "Cargo.toml",
+ r#"
+ [package]
+ name = "foo"
+ version = "0.0.1"
+ authors = []
+
+ [lib]
+ proc-macro = true
+
+ "#,
+ )
+ .file("src/lib.rs", "")
+ .build();
+
+ p.cargo("rustdoc --verbose")
+ .with_stderr_contains(
+ "\
+[RUNNING] `rustdoc --crate-type proc-macro [..]`
+",
+ )
+ .run();
+}
+
#[cargo_test]
#[cfg(all(target_arch = "x86_64", target_os = "linux", target_env = "gnu"))]
fn rustdoc_target() {
.with_stderr(
"\
[DOCUMENTING] foo v0.0.1 ([..])
-[RUNNING] `rustdoc --crate-name foo src/lib.rs [..]\
+[RUNNING] `rustdoc [..]--crate-name foo src/lib.rs [..]\
--target x86_64-unknown-linux-gnu \
-o [CWD]/target/x86_64-unknown-linux-gnu/doc \
[..] \
[RUNNING] `[..]target/release/deps/foo-[..][EXE]`
[RUNNING] `[..]target/release/deps/test-[..][EXE]`
[DOCTEST] foo
-[RUNNING] `rustdoc --test [..]lib.rs[..]`",
+[RUNNING] `rustdoc [..]--test [..]lib.rs[..]`",
)
.with_stdout_contains_n("test test ... ok", 2)
.with_stdout_contains("running 0 tests")
.with_stderr_contains(
"\
[DOCTEST] feature_a
-[RUNNING] `rustdoc --test [..]mock_serde_codegen[..]`",
+[RUNNING] `rustdoc [..]--test [..]mock_serde_codegen[..]`",
)
.run();
.with_stderr_contains(
"\
[DOCTEST] foo
-[RUNNING] `rustdoc --test [..]feature_a[..]`",
+[RUNNING] `rustdoc [..]--test [..]feature_a[..]`",
)
.run();
}