root/test/test_notationdecl_parsetest.rb

Revision 549:e07d72733cae, 0.6 kB (checked in by Sean Russell <ser@…>, 7 months ago)

Moved and renamed files to conform to Ruby's test suite.

Line 
1#! /usr/bin/ruby
2
3require 'test/unit'
4require 'rexml/document'
5
6class TestNotationDecl < Test::Unit::TestCase
7  def setup
8    doc_string = <<-'XMLEND'
9    <!DOCTYPE r SYSTEM "urn:x-henrikmartensson:test" [
10      <!NOTATION n1 PUBLIC "-//HM//NOTATION TEST1//EN" 'urn:x-henrikmartensson.org:test5'>
11      <!NOTATION n2 PUBLIC '-//HM//NOTATION TEST2//EN' "urn:x-henrikmartensson.org:test6">
12    ]>
13    <r/>
14    XMLEND
15    @doctype = REXML::Document.new(doc_string).doctype
16  end
17 
18  def test_notation
19    assert(@doctype.notation('n1'), "Testing notation n1")
20    assert(@doctype.notation('n2'), "Testing notation n2")
21  end
22
23end
Note: See TracBrowser for help on using the browser.