Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/bin/crates-admin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,9 @@ fn main() -> anyhow::Result<()> {
Command::EnqueueJob(command) => enqueue_job::run(command),
}
}

#[test]
fn verify_cli() {
use clap::CommandFactory;
Command::command().debug_assert();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was curious what debug_assert() is doing. It looks like it runs all of https://docs.rs/clap_builder/4.4.8/src/clap_builder/builder/debug_asserts.rs.html, but only when debug_assertions is enabled, which should be the case when running the test suite. In other words, debug_assert() apparently enables some additional checks that won't even be caught when running the binary from a release build.

tl;dr LGTM 👍

}