Feat: Finished functionality

- Added test suite
- Added README.md

Create rust.yml for GitHubCI
This commit is contained in:
2023-07-20 02:42:12 -04:00
parent 8d6a069d03
commit 9f673b28b4
6 changed files with 254 additions and 5 deletions

18
tests/cli.rs Normal file
View 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();
}