|
Revision 1520, 0.7 kB
(checked in by nahi, 4 years ago)
|
removed svn:executable
|
- Property svn:eol-style set to
native
- Property svn:keywords set to
author date id revision
|
| Line | |
|---|
| 1 |
require 'test/unit' |
|---|
| 2 |
require 'wsdl/xmlSchema/parser' |
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
module XSD |
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
class TestEmptyCharset < Test::Unit::TestCase |
|---|
| 9 |
def setup |
|---|
| 10 |
@file = File.join(File.dirname(File.expand_path(__FILE__)), 'noencoding.xml') |
|---|
| 11 |
end |
|---|
| 12 |
|
|---|
| 13 |
def test_wsdl |
|---|
| 14 |
begin |
|---|
| 15 |
xml = WSDL::XMLSchema::Parser.new.parse(File.open(@file) { |f| f.read }) |
|---|
| 16 |
rescue RuntimeError |
|---|
| 17 |
if XSD::XMLParser.const_defined?("REXMLParser") |
|---|
| 18 |
STDERR.puts("rexml cannot handle euc-jp without iconv/uconv.") |
|---|
| 19 |
return |
|---|
| 20 |
end |
|---|
| 21 |
raise |
|---|
| 22 |
rescue Errno::EINVAL |
|---|
| 23 |
# unsupported encoding |
|---|
| 24 |
return |
|---|
| 25 |
end |
|---|
| 26 |
assert_equal(WSDL::XMLSchema::Schema, xml.class) |
|---|
| 27 |
assert_equal(0, xml.collect_elements.size) |
|---|
| 28 |
end |
|---|
| 29 |
end |
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
end |
|---|