Skip to content

Commit

Permalink
Fix expected error message in libxml2 error spec (#8699)
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota authored Jan 28, 2020
1 parent 6e907b1 commit 7c326b0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions spec/std/xml/xml_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,14 @@ describe XML do
end

it "handles errors" do
xml = XML.parse(%(<people>))
xml = XML.parse(%(<people></foo>))
xml.root.not_nil!.name.should eq("people")
errors = xml.errors.not_nil!
errors.size.should eq(1)
errors[0].message.should eq("Premature end of data in tag people line 1")

errors[0].message.should eq("Opening and ending tag mismatch: people line 1 and foo")
errors[0].line_number.should eq(1)
errors[0].to_s.should eq("Premature end of data in tag people line 1")
errors[0].to_s.should eq("Opening and ending tag mismatch: people line 1 and foo")
end

it "gets root namespaces scopes" do
Expand Down

0 comments on commit 7c326b0

Please sign in to comment.