From 8c4f27fd5b79b374011a5fd28991c33c0a6b116e Mon Sep 17 00:00:00 2001 From: Kyle Matsuda Date: Mon, 19 Dec 2022 10:50:55 -0700 Subject: [PATCH] make test clearer --- tests/testsuite/publish_lockfile.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/testsuite/publish_lockfile.rs b/tests/testsuite/publish_lockfile.rs index a62ef7e7a84..35da5131ff8 100644 --- a/tests/testsuite/publish_lockfile.rs +++ b/tests/testsuite/publish_lockfile.rs @@ -499,7 +499,6 @@ fn use_workspace_root_lockfile() { // Workspace members should use `Cargo.lock` at workspace root Package::new("serde", "0.2.0").publish(); - Package::new("serde", "0.2.1").publish(); let p = project() .file( @@ -538,12 +537,13 @@ fn use_workspace_root_lockfile() { .file("bar/src/main.rs", "fn main() {}") .build(); - // Create `Cargo.lock` in the workspace root, and set it to use - // `serde v0.2.0` + // Create `Cargo.lock` in the workspace root. p.cargo("generate-lockfile").run(); - p.cargo("update -p serde:0.2.1 --precise 0.2.0").run(); - // Expect: package `bar` uses `serde v0.2.0` as required by workspace lock + // Now, add a newer version of `serde`. + Package::new("serde", "0.2.1").publish(); + + // Expect: package `bar` uses `serde v0.2.0` as required by workspace `Cargo.lock`. p.cargo("package --workspace") .with_stderr( "\