Skip to content

Commit

Permalink
TST: correct test by stripping special chars at ends
Browse files Browse the repository at this point in the history
  • Loading branch information
anuradhawick committed May 13, 2024
1 parent 15091a1 commit 5209453
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion ktio/src/fops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ pub fn delete_file_if_exists<P: AsRef<Path>>(path: P) -> std::io::Result<()> {
pub fn load_lines_sorted(path: &str) -> Vec<String> {
let data = fs::read(path).unwrap();
let text = String::from_utf8(data).unwrap().trim().to_string();
let mut arr: Vec<String> = text.split('\n').map(|s| s.to_string()).collect();
let mut arr: Vec<String> = text
.trim()
.split('\n')
.map(|s| s.trim().to_string())
.collect();
arr.sort();
arr
}
4 changes: 2 additions & 2 deletions test_data/expected_seq_minimisers
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Read_1 ACGCCAT:0-32 AAATCCC:2-57 AACAACT:27-62 AAACCCT:32-63 AAAACCC:33-72
Read_2 AAAATAC:0-50 AAGAATC:20-57 AAGCAGA:27-64 AACGACG:34-65 AAACGAC:35-66 AAAACGA:36-72
Read_1 ACGCCAT:0-32 AAATCCC:2-57 AACAACT:27-62 AAACCCT:32-63 AAAACCC:33-72
Read_2 AAAATAC:0-50 AAGAATC:20-57 AAGCAGA:27-64 AACGACG:34-65 AAACGAC:35-66 AAAACGA:36-72

0 comments on commit 5209453

Please sign in to comment.