Added spec for lexing inline HTML script tags.

Related issue: #70
This commit is contained in:
Yorick Peterse 2015-03-02 16:20:06 +01:00
parent 8fdf27dcef
commit 351b5ac004
1 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,14 @@
require 'spec_helper'
describe Oga::XML::Lexer do
describe 'HTML script elements' do
it 'treats all contents of a script tag as plain text' do
lex('<script>foo <bar</script>', :html => true).should == [
[:T_ELEM_START, nil, 1],
[:T_ELEM_NAME, 'script', 1],
[:T_TEXT, 'foo <bar', 1],
[:T_ELEM_END, nil, 1]
]
end
end
end