-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
mod common; | ||
|
||
use common::CommandExt; | ||
use predicates::prelude::*; | ||
use predicates::str; | ||
|
||
#[test] | ||
fn add_self_and_then_check_all() { | ||
let self_dir = format!("file://{}", env!("CARGO_MANIFEST_DIR")); | ||
let (mut cmd, temp) = common::herostratus(None); | ||
cmd.arg("add").arg(self_dir).arg("main"); | ||
|
||
let output = cmd.captured_output().unwrap(); | ||
assert!(output.status.success()); | ||
|
||
let (mut cmd, _) = common::herostratus(Some(temp.as_ref().unwrap().path())); | ||
cmd.arg("check-all"); | ||
let output = cmd.captured_output().unwrap(); | ||
assert!(output.status.success()); | ||
|
||
// who knows how many achievements 'main' will have? | ||
let assertion = | ||
str::contains("Finalizing rules ...").and(str::contains("achievements after processing")); | ||
let stderr = String::from_utf8_lossy(&output.stderr); | ||
assert!(assertion.eval(&stderr)); | ||
} |