Feat: Finished functionality
- Added test suite - Added README.md Create rust.yml for GitHubCI
This commit is contained in:
18
tests/cli.rs
Normal file
18
tests/cli.rs
Normal file
@@ -0,0 +1,18 @@
|
||||
use assert_cmd::Command;
|
||||
use predicates::prelude::*;
|
||||
|
||||
#[test]
|
||||
fn dies_no_args() {
|
||||
let mut cmd = Command::cargo_bin("echor").expect("cargo binary error");
|
||||
|
||||
cmd.assert()
|
||||
.failure()
|
||||
.stderr(predicate::str::contains("Usage"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn runs() {
|
||||
let mut cmd = Command::cargo_bin("echor").expect("cargo binary error");
|
||||
|
||||
cmd.arg("hello").assert().success();
|
||||
}
|
Reference in New Issue
Block a user