From d0f48e0e3c090804faf18f3480616989d103b462 Mon Sep 17 00:00:00 2001 From: Tero Tasanen Date: Sun, 14 Sep 2014 14:20:58 +0300 Subject: [PATCH] Added a lexer test case for uppercase void elements --- spec/oga/xml/lexer/html_void_elements_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/oga/xml/lexer/html_void_elements_spec.rb b/spec/oga/xml/lexer/html_void_elements_spec.rb index aac509f..8e3337f 100644 --- a/spec/oga/xml/lexer/html_void_elements_spec.rb +++ b/spec/oga/xml/lexer/html_void_elements_spec.rb @@ -10,6 +10,14 @@ describe Oga::XML::Lexer do ] end + example 'lex a upper case void element' do + lex('
', html: true).should == [ + [:T_ELEM_START, nil, 1], + [:T_ELEM_NAME, "BR", 1], + [:T_ELEM_END, nil, 1] + ] + end + example 'lex text after a void element' do lex('foo', :html => true).should == [ [:T_ELEM_START, nil, 1],