diff --git a/spec/oga/xml/lexer/html_closing_rules/li_spec.rb b/spec/oga/xml/lexer/html_closing_rules/li_spec.rb new file mode 100644 index 0000000..ebb18f7 --- /dev/null +++ b/spec/oga/xml/lexer/html_closing_rules/li_spec.rb @@ -0,0 +1,16 @@ +require 'spec_helper' + +describe Oga::XML::Lexer do + describe 'using HTML
  • elements' do + it 'lexes two unclosed
  • elements following each other as separate elements' do + lex_html('
  • foo
  • bar').should == [ + [:T_ELEM_NAME, 'li', 1], + [:T_TEXT, 'foo', 1], + [:T_ELEM_END, nil, 1], + [:T_ELEM_NAME, 'li', 1], + [:T_TEXT, 'bar', 1], + [:T_ELEM_END, nil, 1] + ] + end + end +end