diff --git a/tests/testsuite/book_test.rs b/tests/testsuite/book_test.rs index f15faccf..bbcc1906 100644 --- a/tests/testsuite/book_test.rs +++ b/tests/testsuite/book_test.rs @@ -231,6 +231,12 @@ impl BookTest { }; f(&mut cmd); cmd.run(); + // Ensure that `built` gets set if a build command is used so that all + // the `check` methods do not overwrite the contents of what was just + // built. + if cmd.args.first().map(String::as_str) == Some("build") { + self.built = true + } self }