Skip to content

Commit

Permalink
add unit test for hivescan
Browse files Browse the repository at this point in the history
  • Loading branch information
janstarke committed Apr 15, 2024
1 parent 30b8148 commit cd7ae19
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 1 deletion.
Binary file added tests/data/hivescan/NewDirtyHive1/NewDirtyHive
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added tests/data/hivescan/NewDirtyHive2/NewDirtyHive
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added tests/data/hivescan/testhive
Binary file not shown.
1 change: 1 addition & 0 deletions tests/hivescan/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mod testhive;
14 changes: 14 additions & 0 deletions tests/hivescan/testhive.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
use std::path::PathBuf;

use assert_cmd::Command;

#[test]
fn scan_testhive() {
let mut cmd = Command::cargo_bin("hivescan").unwrap();
let mut data_path = PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap());
data_path.push("tests");
data_path.push("data");
data_path.push("hivescan");
data_path.push("testhive");
cmd.arg(data_path).assert().success();
}
3 changes: 2 additions & 1 deletion tests/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
mod mactime2;
mod ts2date;
mod lnk2bodyfile;
mod lnk2bodyfile;
mod hivescan;

0 comments on commit cd7ae19

Please sign in to comment.