mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/xmlrpc/test_parser.rb, test/xmlrpc/data/*.expected: Expected
values are now stored in YAML instead of using #inspect. This fixes false hash order. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5847fadf7b
commit
4c10b035ef
7 changed files with 279 additions and 11 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Thu Dec 2 15:13:53 2004 Michael Neumann <mneumann@ruby-lang.org>
|
||||||
|
|
||||||
|
* test/xmlrpc/test_parser.rb, test/xmlrpc/data/*.expected: Expected
|
||||||
|
values are now stored in YAML instead of using #inspect. This fixes
|
||||||
|
false hash order.
|
||||||
|
|
||||||
Fri Dec 3 00:11:48 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Fri Dec 3 00:11:48 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* io.c (rb_file_initialize): [ruby-dev:25032]
|
* io.c (rb_file_initialize): [ruby-dev:25032]
|
||||||
|
|
|
@ -1 +1,3 @@
|
||||||
[true, false]
|
---
|
||||||
|
- true
|
||||||
|
- false
|
|
@ -1 +1,3 @@
|
||||||
[true, "test"]
|
---
|
||||||
|
- true
|
||||||
|
- test
|
|
@ -1 +1,10 @@
|
||||||
[true, "Site,SANs,Array\nConfigured Capacity,Array Reserved Capacity,Array Ava\nilable Capacity,Array % Reserved,Host Allocated,Host Used,Host Free,Host %\nUsed\n"]
|
---
|
||||||
|
- true
|
||||||
|
- >
|
||||||
|
Site,SANs,Array
|
||||||
|
|
||||||
|
Configured Capacity,Array Reserved Capacity,Array Ava
|
||||||
|
|
||||||
|
ilable Capacity,Array % Reserved,Host Allocated,Host Used,Host Free,Host %
|
||||||
|
|
||||||
|
Used
|
||||||
|
|
|
@ -1 +1,7 @@
|
||||||
["Test", ["Hallo Leute", " Hallo ", "", " "]]
|
---
|
||||||
|
- Test
|
||||||
|
-
|
||||||
|
- Hallo Leute
|
||||||
|
- " Hallo "
|
||||||
|
- ''
|
||||||
|
- " "
|
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,7 @@
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
require 'xmlrpc/datetime'
|
require 'xmlrpc/datetime'
|
||||||
require "xmlrpc/parser"
|
require "xmlrpc/parser"
|
||||||
|
require 'yaml'
|
||||||
|
|
||||||
module GenericParserTest
|
module GenericParserTest
|
||||||
def datafile(base)
|
def datafile(base)
|
||||||
|
@ -8,7 +9,7 @@ module GenericParserTest
|
||||||
end
|
end
|
||||||
|
|
||||||
def load_data(name)
|
def load_data(name)
|
||||||
[File.read(datafile(name) + ".xml"), File.read(datafile(name) + ".expected").chomp]
|
[File.read(datafile(name) + ".xml"), YAML.load(File.read(datafile(name) + ".expected"))]
|
||||||
end
|
end
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
|
@ -28,19 +29,19 @@ module GenericParserTest
|
||||||
# test parseMethodResponse --------------------------------------------------
|
# test parseMethodResponse --------------------------------------------------
|
||||||
|
|
||||||
def test_parseMethodResponse1
|
def test_parseMethodResponse1
|
||||||
assert_equal(@expected1, @p.parseMethodResponse(@xml1).inspect)
|
assert_equal(@expected1, @p.parseMethodResponse(@xml1))
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_parseMethodResponse2
|
def test_parseMethodResponse2
|
||||||
assert_equal(@expected2, @p.parseMethodResponse(@xml2).inspect)
|
assert_equal(@expected2, @p.parseMethodResponse(@xml2))
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_parseMethodResponse3
|
def test_parseMethodResponse3
|
||||||
assert_equal(@expected3, @p.parseMethodResponse(@xml3).inspect)
|
assert_equal(@expected3, @p.parseMethodResponse(@xml3))
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_cdata
|
def test_cdata
|
||||||
assert_equal(@cdata_expected, @p.parseMethodResponse(@cdata_xml).inspect)
|
assert_equal(@cdata_expected, @p.parseMethodResponse(@cdata_xml))
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_dateTime
|
def test_dateTime
|
||||||
|
@ -50,7 +51,7 @@ module GenericParserTest
|
||||||
# test parseMethodCall ------------------------------------------------------
|
# test parseMethodCall ------------------------------------------------------
|
||||||
|
|
||||||
def test_parseMethodCall
|
def test_parseMethodCall
|
||||||
assert_equal(@expected4, @p.parseMethodCall(@xml4).inspect)
|
assert_equal(@expected4, @p.parseMethodCall(@xml4))
|
||||||
end
|
end
|
||||||
|
|
||||||
# test fault ----------------------------------------------------------------
|
# test fault ----------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in a new issue