Skip to content

Commit b09c588

Browse files
authored
Merge pull request #2785 from ehuss/ensure-test-built
Don't rebuild books in tests
2 parents 95128b6 + 824e2a7 commit b09c588

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/testsuite/book_test.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,12 @@ impl BookTest {
231231
};
232232
f(&mut cmd);
233233
cmd.run();
234+
// Ensure that `built` gets set if a build command is used so that all
235+
// the `check` methods do not overwrite the contents of what was just
236+
// built.
237+
if cmd.args.first().map(String::as_str) == Some("build") {
238+
self.built = true
239+
}
234240
self
235241
}
236242

0 commit comments

Comments
 (0)