From 1c577d36e30cb0b94aecad249687ac3798281670 Mon Sep 17 00:00:00 2001 From: Sam O'Connor Date: Wed, 20 Apr 2016 09:46:14 +1000 Subject: [PATCH] Julia v0.5 compat --- test/runtests.jl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 5806d14..3e3dc03 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -2,6 +2,8 @@ using XMLDict using Base.Test using JSON +using Compat.readstring +using Compat.write function xdict(xml) for (n,v) in xml_dict(xml; strip_text=true) @@ -426,14 +428,14 @@ xml9 = """ """ -xml10 = readall("REC-xml-20081126.xml") +xml10 = readstring("REC-xml-20081126.xml") function normalise_xml(xml) o,i,p = readandwrite( `bash -c 'xmllint --noent --format --nocdata - | sed s/\ xmlns=\".*\"//g' `) write(i, xml) close(i) - readall(o) + readstring(o) end @@ -446,8 +448,8 @@ for xml in [xml1, xml2, xml3, xml4, xml5, xml6, xml7, xml8, xml9, xml10] json_dump(xml_dict(xml)) - open("/tmp/a", "w") do f write(f, normalise_xml(xml)) end - open("/tmp/b", "w") do f write(f, normalise_xml(XMLDict.dict_xml(xml_dict(xml)))) end + write("/tmp/a", normalise_xml(xml)) + write("/tmp/b", normalise_xml(XMLDict.dict_xml(xml_dict(xml)))) run(`opendiff /tmp/a /tmp/b`) end