Lexer tests for single quoted attributes.

This commit is contained in:
Yorick Peterse 2014-04-03 18:50:07 +02:00
parent 30c01a5aee
commit 6cf906e500
1 changed files with 10 additions and 0 deletions

View File

@ -63,6 +63,16 @@ describe Oga::XML::Lexer do
[:T_ELEM_END, nil, 1] [:T_ELEM_END, nil, 1]
] ]
end end
example 'lex a paragraph element with single quoted attributes' do
lex("<p class='foo'></p>").should == [
[:T_ELEM_START, nil, 1],
[:T_ELEM_NAME, 'p', 1],
[:T_ATTR, 'class', 1],
[:T_STRING, 'foo', 1],
[:T_ELEM_END, nil, 1]
]
end
end end
context 'nested elements' do context 'nested elements' do