Merge pull request #2785 from ehuss/ensure-test-built

Don't rebuild books in tests
This commit is contained in:
Eric Huss
2025-08-12 02:27:02 +00:00
committed by GitHub

View File

@@ -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
}