Spec for inline JS and CDATA tags.
This commit is contained in:
parent
f268af5bc6
commit
145315c26a
|
@ -24,5 +24,15 @@ describe Oga::XML::Lexer do
|
|||
[:T_ELEM_END, nil, 1]
|
||||
]
|
||||
end
|
||||
|
||||
example 'lex inline Javascript containing a CDATA tag' do
|
||||
lex("<script>#{@javascript}<![CDATA[foo]]></script>").should == [
|
||||
[:T_ELEM_START, nil, 1],
|
||||
[:T_ELEM_NAME, 'script', 1],
|
||||
[:T_TEXT, @javascript, 1],
|
||||
[:T_CDATA, 'foo', 1],
|
||||
[:T_ELEM_END, nil, 1]
|
||||
]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue