From 1ba801370f0dc10d190dc8c01101336c8162a04e Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Mon, 18 May 2015 21:49:36 +0200 Subject: [PATCH] HTML closing specs for the
  • element --- spec/oga/xml/lexer/html_closing_rules/li_spec.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 spec/oga/xml/lexer/html_closing_rules/li_spec.rb 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