Skip to content

Commit

Permalink
feat: add hydrate_one
Browse files Browse the repository at this point in the history
  • Loading branch information
zifeo committed Feb 26, 2023
1 parent d36571c commit 2c147e1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ jobs:
with:
key: ${{ runner.os }}
- run: |
cargo run -- --help
cargo test
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ env_logger = "0.10.0"
openssl = { version = "0.10.45", features = ["vendored"] }
serde_json = "1.0.93"

[dev-dependencies]
assert_cmd = "2.0.8"

16 changes: 16 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,19 @@ async fn main() -> Result<()> {
}
}
}

#[test]
fn verify_cli() {
use crate::Args;
use clap::CommandFactory;
Args::command().debug_assert()
}

#[test]
fn end_to_end() {
// need build before running this test
use assert_cmd::Command;

let mut cmd = Command::cargo_bin("lade").unwrap();
cmd.arg("-h").assert().success();
}

0 comments on commit 2c147e1

Please sign in to comment.