BioJulia / FASTX.jl

Parse and process FASTA and FASTQ formatted files of biological sequences.
https://biojulia.dev
MIT License
61 stars 20 forks source link

Fix windows newline bug (issue 25) #28

Closed jakobnissen closed 4 years ago

jakobnissen commented 4 years ago

This is a bugfix to issue #25 .

Briefly, the problem was that, in readrecord.jl, at the state transition after a record, @escape was called. On UNIX systems, this would occur at the \n byte after a record, which would put the machine in a state immediately before the next record, or at EOF if at last record. However, on Windows system where the newline is two bytes (\r\n), this would occur after only the \r byte had been consumed. This means that the machine would not be at EOF, even though all records had been consumed.

codecov[bot] commented 4 years ago

Codecov Report

Merging #28 into master will increase coverage by 0.40%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #28      +/-   ##
==========================================
+ Coverage   83.29%   83.70%   +0.40%     
==========================================
  Files          13       13              
  Lines         497      497              
==========================================
+ Hits          414      416       +2     
+ Misses         83       81       -2     
Flag Coverage Δ
#unittests 83.70% <100.00%> (+0.40%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/fastq/readrecord.jl 87.09% <100.00%> (+0.21%) :arrow_up:
src/fastq/reader.jl 89.18% <0.00%> (+4.97%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update db4caae...a0051fe. Read the comment docs.