Use assert_cmd::Command to spawn your binary and chain assertions to verify exit codes and output. Add assert_cmd = "2" to your [dev-dependencies] in Cargo.toml, then write a test that calls Command::cargo_bin with your binary name, passes arguments, and asserts the result.
use assert_cmd::Command;
#[test]
fn supports_html_renderer() {
let cmd = Command::cargo_bin("mdbook-trpl-note")
.unwrap()
.args(["supports", "html"])
.ok();
assert!(cmd.is_ok());
}