Skip to content

Commit

Permalink
Add dogfood test
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed Nov 12, 2023
1 parent be085e5 commit 400260c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/dogfood.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
use snapbox::cmd::cargo_bin;
use std::{env::remove_var, process::Command};

mod util;
use util::{tee, Tee};

#[ctor::ctor]
fn initialize() {
remove_var("CARGO_TERM_COLOR");
}

#[test]
fn dogfood() {
let mut command = Command::new(cargo_bin("cargo-unmaintained"));
command.args(["unmaintained", "--color=never", "--verbose"]);

let output = tee(command, Tee::Stdout).unwrap();

assert!(output.status.success());
assert!(output.captured.is_empty());
}

0 comments on commit 400260c

Please sign in to comment.