Skip to content

Commit 566dc98

Browse files
committed
Add doc library test for a no_std target
1 parent d6bc881 commit 566dc98

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/bootstrap/src/core/builder/tests.rs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1551,7 +1551,7 @@ mod snapshot {
15511551
}
15521552

15531553
#[test]
1554-
fn doc_library_no_std_target() {
1554+
fn doc_core_no_std_target() {
15551555
let ctx = TestCtx::new();
15561556
insta::assert_snapshot!(
15571557
ctx.config("doc")
@@ -1564,6 +1564,21 @@ mod snapshot {
15641564
[doc] std 1 <host> crates=[core]
15651565
");
15661566
}
1567+
1568+
#[test]
1569+
fn doc_library_no_std_target() {
1570+
let ctx = TestCtx::new();
1571+
insta::assert_snapshot!(
1572+
ctx.config("doc")
1573+
.path("library")
1574+
.override_target_no_std(&host_target())
1575+
.render_steps(), @r"
1576+
[build] llvm <host>
1577+
[build] rustc 0 <host> -> rustc 1 <host>
1578+
[build] rustdoc 0 <host>
1579+
[doc] std 1 <host> crates=[alloc,core]
1580+
");
1581+
}
15671582
}
15681583

15691584
struct ExecutedSteps {
@@ -1574,6 +1589,7 @@ impl ExecutedSteps {
15741589
fn render(&self) -> String {
15751590
self.render_with(RenderConfig::default())
15761591
}
1592+
15771593
fn render_with(&self, config: RenderConfig) -> String {
15781594
render_steps(&self.steps, config)
15791595
}

0 commit comments

Comments
 (0)