@@ -230,14 +230,21 @@ fn test_expand_input_paths_relative_paths() -> Result<()> {
230230fn test_expand_input_paths_compressed_files ( ) -> Result < ( ) > {
231231 let env = CoverageTestEnvironment :: new ( ) ?;
232232
233- let gz_file = env. create_test_fasta ( "test.fa.gz" , ">seq\n ACGT\n " ) ?;
234- let fq_gz_file = env. create_test_fasta ( "test.fq.gz" , "@seq\n ACGT\n +\n IIII\n " ) ?;
233+ let compressed_files = [
234+ env. create_test_fasta ( "test.fa.gz" , ">seq\n ACGT\n " ) ?,
235+ env. create_test_fasta ( "test.fq.gz" , "@seq\n ACGT\n +\n IIII\n " ) ?,
236+ env. create_test_fasta ( "test.fa.bz2" , ">seq\n ACGT\n " ) ?,
237+ env. create_test_fasta ( "test.fasta.xz" , ">seq\n ACGT\n " ) ?,
238+ env. create_test_fasta ( "test.fastq.zst" , "@seq\n ACGT\n +\n IIII\n " ) ?,
239+ env. create_test_fasta ( "test.fq.zstd" , "@seq\n ACGT\n +\n IIII\n " ) ?,
240+ ] ;
235241
236- let result = expand_input_paths ( & [ gz_file . clone ( ) , fq_gz_file . clone ( ) ] ) ?;
242+ let result = expand_input_paths ( & compressed_files ) ?;
237243
238- assert_eq ! ( result. len( ) , 2 ) ;
239- assert ! ( result. contains( & gz_file) ) ;
240- assert ! ( result. contains( & fq_gz_file) ) ;
244+ assert_eq ! ( result. len( ) , compressed_files. len( ) ) ;
245+ for file in compressed_files {
246+ assert ! ( result. contains( & file) ) ;
247+ }
241248
242249 Ok ( ( ) )
243250}
@@ -328,9 +335,19 @@ fn test_is_sequence_file_edge_cases() {
328335 assert ! ( is_sequence_file( Path :: new( "file.name.with.dots.fa" ) ) ) ;
329336 assert ! ( is_sequence_file( Path :: new( "version.1.0.fasta" ) ) ) ;
330337
331- assert ! ( is_sequence_file( Path :: new( "file.fastq.gz" ) ) ) ;
332- assert ! ( is_sequence_file( Path :: new( "file.fq.gz" ) ) ) ;
333- assert ! ( !is_sequence_file( Path :: new( "file.fa.bz2" ) ) ) ;
338+ for filename in [
339+ "file.fastq.gz" ,
340+ "file.fq.gz" ,
341+ "file.fa.bz2" ,
342+ "file.fasta.xz" ,
343+ "file.fastq.zst" ,
344+ "file.fq.zstd" ,
345+ ] {
346+ assert ! (
347+ is_sequence_file( Path :: new( filename) ) ,
348+ "Failed for {filename}"
349+ ) ;
350+ }
334351
335352 let mixed_case = vec ! [
336353 "File.Fa" ,
0 commit comments