From 9af393032143fc113403846836d15a0dc75dc8f2 Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Mon, 5 Aug 2024 23:20:39 -0400 Subject: [PATCH] test(build-std): expand assertion to ensure no index update --- tests/build-std/main.rs | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/tests/build-std/main.rs b/tests/build-std/main.rs index 107564321..aec951a95 100644 --- a/tests/build-std/main.rs +++ b/tests/build-std/main.rs @@ -119,8 +119,31 @@ fn basic() { "#]]) .run(); - p.cargo("run").build_std().target_host().run(); - p.cargo("test").build_std().target_host().run(); + p.cargo("run") + .build_std() + .target_host() + .with_stderr_data(str![[r#" +[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s +[RUNNING] `target/[HOST_TARGET]/debug/foo` + +"#]]) + .run(); + p.cargo("test") + .build_std() + .target_host() + .with_stderr_data(str![[r#" +[COMPILING] rustc-std-workspace-std [..] +... +[COMPILING] test v0.0.0 ([..]) +[COMPILING] foo v0.0.1 ([ROOT]/foo) +[FINISHED] `test` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s +[RUNNING] unittests src/lib.rs (target/[HOST_TARGET]/debug/deps/foo-[HASH]) +[RUNNING] unittests src/main.rs (target/[HOST_TARGET]/debug/deps/foo-[HASH]) +[RUNNING] tests/smoke.rs (target/[HOST_TARGET]/debug/deps/smoke-[HASH]) +[DOCTEST] foo + +"#]]) + .run(); // Check for hack that removes dylibs. let deps_dir = Path::new("target")