Project

General

Profile

Bug #8731 ยป rexml-sax2parser-unittest.patch

ohai (Ippei Obayashi), 08/04/2013 06:01 PM

View differences:

test/rexml/test_sax.rb
271 271
      flunk $!.message
272 272
    end
273 273
  end
274

  
275
  class EmptyListener
276
    include REXML::SAX2Listener
277
  end
278

  
279
  def test_notationdecl_entitydecl
280
    xml = <<EOS
281
<!DOCTYPE root [
282
  <!ENTITY % YN '"Yes"'>
283
  <!NOTATION x SYSTEM "URIx">
284
]>
285
<root />
286
EOS
287
    parser = REXML::Parsers::SAX2Parser.new(xml)
288
    parser.listen(EmptyListener.new)
289
    parser.parse
290
  end
274 291
end
275 292

  
276 293
class MySAX2Listener