Skip to content

Commit

Permalink
Fix test for Windows and add test for writeSBML(::Model, ::String)
Browse files Browse the repository at this point in the history
  • Loading branch information
giordano committed Nov 19, 2021
1 parent 2989a06 commit 5b2918f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/loadmodels.jl
Original file line number Diff line number Diff line change
Expand Up @@ -237,5 +237,15 @@ end

@testset "writeSBML" begin
model = readSBML(joinpath(@__DIR__, "data", "Dasgupta2020.xml"))
@test writeSBML(model) == read(joinpath(@__DIR__, "data", "Dasgupta2020-written.xml"), String)
expected = read(joinpath(@__DIR__, "data", "Dasgupta2020-written.xml"), String)
# Remove carriage returns, if any
expected = replace(expected, '\r' => "")
@test writeSBML(model) == expected
mktemp() do filename, _
writeSBML(model, filename)
content = read(filename, String)
# Remove carriage returns, if any
content = replace(content, '\r' => "")
@test content == expected
end
end

0 comments on commit 5b2918f

Please sign in to comment.