mirror of
https://github.com/MillironX/XAM.jl.git
synced 2024-11-22 17:59:55 +00:00
Check that EOF_BLOCK gets written
This commit is contained in:
parent
10c1aacd4d
commit
560a5cd8df
1 changed files with 10 additions and 2 deletions
|
@ -209,6 +209,14 @@
|
||||||
close(reader)
|
close(reader)
|
||||||
close(writer)
|
close(writer)
|
||||||
|
|
||||||
|
|
||||||
|
# Check that EOF_BLOCK gets written.
|
||||||
|
nbytes = filesize(path)
|
||||||
|
@test BAM.BGZFStreams.EOF_BLOCK == open(path) do io
|
||||||
|
seek(io, nbytes - length(BAM.BGZFStreams.EOF_BLOCK))
|
||||||
|
read(io)
|
||||||
|
end
|
||||||
|
|
||||||
reader = open(BAM.Reader, path)
|
reader = open(BAM.Reader, path)
|
||||||
|
|
||||||
@test header(reader) == header_original
|
@test header(reader) == header_original
|
||||||
|
@ -247,12 +255,12 @@
|
||||||
|
|
||||||
index = BAM.BAI(filepath * ".bai")
|
index = BAM.BAI(filepath * ".bai")
|
||||||
reader = open(BAM.Reader, filepath, index=index)
|
reader = open(BAM.Reader, filepath, index=index)
|
||||||
|
|
||||||
@test isa(eachoverlap(reader, "chr1", 1:100), BAM.OverlapIterator)
|
@test isa(eachoverlap(reader, "chr1", 1:100), BAM.OverlapIterator)
|
||||||
|
|
||||||
close(reader)
|
close(reader)
|
||||||
|
|
||||||
@test_throws ErrorException open(BAM.Reader, filepath, index=1234)
|
@test_throws ErrorException open(BAM.Reader, filepath, index=1234)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue