Sha256: 59537cc839bf32675e5d6228f321d244502467210207016e5e9079fde894ed26

Contents?: true

Size: 702 Bytes

Versions: 15

Compression:

Stored size: 702 Bytes

Contents

# encoding: ASCII-8BIT
require 'helper'
require 'wsdl/xmlSchema/parser'


module XSD


class TestEmptyCharset < Test::Unit::TestCase
  def setup
    @file = File.join(File.dirname(File.expand_path(__FILE__)), 'noencoding.xml')
  end

  def test_wsdl
    begin
      xml = WSDL::XMLSchema::Parser.new.parse(File.open(@file) { |f| f.read })
    rescue RuntimeError
      if XSD::XMLParser.const_defined?("REXMLParser")
	STDERR.puts("rexml cannot handle euc-jp without iconv/uconv.")
	return
      end
      raise
    rescue Errno::EINVAL
      # unsupported encoding
      return
    end
    assert_equal(WSDL::XMLSchema::Schema, xml.class)
    assert_equal(0, xml.collect_elements.size)
  end
end


end

Version data entries

15 entries across 15 versions & 9 rubygems

Version Path
malagant-soap4r-1.5.8.20141127181857 test/xsd/test_noencoding.rb
rtiss_soap4r-1.6.1 test/xsd/test_noencoding.rb
rtiss_soap4r-1.6.0 test/xsd/test_noencoding.rb
eSpace_soap4r-1.5.8 test/xsd/test_noencoding.rb
soap4r-ruby19-1.5.9 test/xsd/test_noencoding.rb
tomdz-soap4r-1.5.8.20120202093209 test/xsd/test_noencoding.rb
soap5r-2.0.3 test/xsd/test_noencoding.rb
soap5r-2.0.2 test/xsd/test_noencoding.rb
soap5r-2.0.1 test/xsd/test_noencoding.rb
soap5r-2.0.0 test/xsd/test_noencoding.rb
soap5r-2.0.0.20120130130121 test/xsd/test_noencoding.rb
soap4r-sgonyea-1.5.9 test/xsd/test_noencoding.rb
sunteya-soap4r-1.5.8.0 test/xsd/test_noencoding.rb
tomdz-soap4r-1.5.8.20111103171510 test/xsd/test_noencoding.rb
rubyjedi-soap4r-1.5.8.20100619003610 test/xsd/test_noencoding.rb