Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start End Mismatch: element X not closed errors in sax_test #335

Open
jirutka opened this issue Apr 22, 2023 · 2 comments
Open

Start End Mismatch: element X not closed errors in sax_test #335

jirutka opened this issue Apr 22, 2023 · 2 comments

Comments

@jirutka
Copy link

jirutka commented Apr 22, 2023

   [:start_element, :child],
   [:end_element, :child],
?  [:error, "Start End Mismatch: element 'top   ' not closed", 4, 0],
?                                         (null)
?                                         ???
   [:end_element, :top]]
===============================================================================
....................................................3: [:error, "Start End Mismatch: element 'top' not closed", 1, 23] != [:error, "Start End Mismatch: element '(null)' not closed", 1, 23]

expected: [[:start_element, :top], [:error, "Not Terminated: text not terminated", 1, 23], [:text, "This is some text."], [:error, "Start End Mismatch: element 'top' not closed", 1, 23], [:end_element, :top]]
  actual: [[:start_element, :top], [:error, "Not Terminated: text not terminated", 1, 23], [:text, "This is some text."], [:error, "Start End Mismatch: element '(null)' not closed", 1, 23], [:end_element, :top]]
F
===============================================================================
Failure: test_sax_text_no_term(SaxBaseTest)
/home/jirutjak/aports/community/ruby-ox/src/ox-2.14.16/test/sax/helpers.rb:37:in `parse_compare'
./test/sax/sax_test.rb:565:in `test_sax_text_no_term'
     562:
     563:   def test_sax_text_no_term
     564:     Ox.default_options = $ox_sax_options
  => 565:     parse_compare(%{<top>This is some text.},
     566:                   [
     567:                     [:start_element, :top],
     568:                     [:error, 'Not Terminated: text not terminated', 1, 23],
<[[:start_element, :top],
 [:error, "Not Terminated: text not terminated", 1, 23],
 [:text, "This is some text."],
 [:error, "Start End Mismatch: element 'top' not closed", 1, 23],
 [:end_element, :top]]> expected but was
<[[:start_element, :top],
 [:error, "Not Terminated: text not terminated", 1, 23],
 [:text, "This is some text."],
 [:error, "Start End Mismatch: element '(null)' not closed", 1, 23],
 [:end_element, :top]]>

diff:
  [[:start_element, :top],
   [:error, "Not Terminated: text not terminated", 1, 23],
   [:text, "This is some text."],
?  [:error, "Start End Mismatch: element 'top   ' not closed", 1, 23],
?                                         (null)
?                                         ???
   [:end_element, :top]]
===============================================================================
..........
Finished in 0.038616298 seconds.
-------------------------------------------------------------------------------
88 tests, 100 assertions, 3 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
96.5909% passed
-------------------------------------------------------------------------------
2278.83 tests/s, 2589.58 assertions/s

Environment:

  • ox 2.14.16
  • Ruby 3.2.2
  • gcc 12.2
  • Alpine Linux Edge x86_64
@ohler55
Copy link
Owner

ohler55 commented Apr 22, 2023

I'll look into it to see what changed.

@ohler55
Copy link
Owner

ohler55 commented Apr 23, 2023

The develop branch should now pass the tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants