mirror of
https://github.com/MillironX/XAM.jl.git
synced 2024-12-23 13:28:16 +00:00
Workaround for #23
This commit is contained in:
parent
a51e91141f
commit
da0c1881dd
2 changed files with 23 additions and 3 deletions
|
@ -28,9 +28,16 @@ const sam_machine_metainfo, sam_machine_record, sam_machine_header, sam_machine_
|
|||
key.actions[:enter] = [:pos2]
|
||||
key.actions[:exit] = [:metainfo_dict_key]
|
||||
val = re"[ -~]+"
|
||||
val.actions[:enter] = [:pos2]
|
||||
val.actions[:exit] = [:metainfo_dict_val]
|
||||
keyval = cat(key, ':', val)
|
||||
|
||||
# val.actions[:enter] = [:pos2]
|
||||
# val.actions[:exit] = [:metainfo_dict_val]
|
||||
# keyval = cat(key, ':', val)
|
||||
|
||||
separator = re":"
|
||||
separator.actions[:exit] = [:pos2]
|
||||
|
||||
keyval = cat(key, separator, opt(val))
|
||||
keyval.actions[:exit] = [:metainfo_dict_val]
|
||||
|
||||
cat(keyval, rep(cat('\t', keyval)))
|
||||
end
|
||||
|
|
|
@ -30,6 +30,19 @@
|
|||
@test metainfo["VN"] == "1.0"
|
||||
@test metainfo["SO"] == "coordinate"
|
||||
@test_throws KeyError metainfo["GO"]
|
||||
|
||||
|
||||
metainfo = SAM.MetaInfo("@PG ID:hisat2 PN:hisat2 VN: CL:\"/script.sh\"")
|
||||
@test haskey(metainfo, "ID")
|
||||
@test haskey(metainfo, "PN")
|
||||
# @test haskey(metainfo, "VN")
|
||||
@test haskey(metainfo, "CL")
|
||||
|
||||
@test metainfo["ID"] == "hisat2"
|
||||
@test metainfo["PN"] == "hisat2"
|
||||
# @test metainfo["VN"] == ""
|
||||
@test metainfo["CL"] == "\"/script.sh\""
|
||||
|
||||
end
|
||||
|
||||
@testset "Header" begin
|
||||
|
|
Loading…
Reference in a new issue