Skip to content

Commit

Permalink
added new integration test for -o, --full-matrix triangle
Browse files Browse the repository at this point in the history
  • Loading branch information
bluenote-1577 committed Jun 28, 2024
1 parent 9709a52 commit b6cf523
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### v0.2.2 released - 2024-TODO

#### Minor

* fixed a bug where `skani triangle --full-matrix` gave different results between STDOUT and `-o` (thanks to Florian Plaza Onate)

### v0.2.1 released - 2023-10-11

More consistent support for small contigs and sequences.
Expand Down
27 changes: 27 additions & 0 deletions tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,33 @@ fn full_test_triangle() {
);
let err_line = std::str::from_utf8(&out.as_ref().unwrap().stderr).unwrap();
assert!(!err_line.contains("WARN") && !err_line.contains("ERROR"));

let mut cmd = Command::cargo_bin("skani").unwrap();
let out = cmd
.arg("triangle")
.arg("-l")
.arg("./test_files/query_list.txt")
.arg("--full-matrix")
.arg("-o")
.arg("./tests/results/output_o_triangle_full")
.output();

let mut cmd = Command::cargo_bin("skani").unwrap();
let out = cmd
.arg("triangle")
.arg("-l")
.arg("./test_files/query_list.txt")
.arg("--full-matrix")
.output();

let std_out = std::str::from_utf8(&out.as_ref().unwrap().stdout).unwrap();

//assert that std_out and output_o_triangle_full are the same by reading the file and using
//assert!
let mut cmd = Command::new("cat");
let out = cmd.arg("./tests/results/output_o_triangle_full").output();
let out = std::str::from_utf8(&out.as_ref().unwrap().stdout).unwrap();
assert_eq!(std_out, out);
}


0 comments on commit b6cf523

Please sign in to comment.