зеркало из https://github.com/github/ruby.git
* 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:
Родитель
5847fadf7b
Коммит
4c10b035ef
|
@ -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>
|
||||
|
||||
* 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 "
|
||||
- ''
|
||||
- " "
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -1,6 +1,7 @@
|
|||
require 'test/unit'
|
||||
require 'xmlrpc/datetime'
|
||||
require "xmlrpc/parser"
|
||||
require 'yaml'
|
||||
|
||||
module GenericParserTest
|
||||
def datafile(base)
|
||||
|
@ -8,7 +9,7 @@ module GenericParserTest
|
|||
end
|
||||
|
||||
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
|
||||
|
||||
def setup
|
||||
|
@ -28,19 +29,19 @@ module GenericParserTest
|
|||
# test parseMethodResponse --------------------------------------------------
|
||||
|
||||
def test_parseMethodResponse1
|
||||
assert_equal(@expected1, @p.parseMethodResponse(@xml1).inspect)
|
||||
assert_equal(@expected1, @p.parseMethodResponse(@xml1))
|
||||
end
|
||||
|
||||
def test_parseMethodResponse2
|
||||
assert_equal(@expected2, @p.parseMethodResponse(@xml2).inspect)
|
||||
assert_equal(@expected2, @p.parseMethodResponse(@xml2))
|
||||
end
|
||||
|
||||
def test_parseMethodResponse3
|
||||
assert_equal(@expected3, @p.parseMethodResponse(@xml3).inspect)
|
||||
assert_equal(@expected3, @p.parseMethodResponse(@xml3))
|
||||
end
|
||||
|
||||
def test_cdata
|
||||
assert_equal(@cdata_expected, @p.parseMethodResponse(@cdata_xml).inspect)
|
||||
assert_equal(@cdata_expected, @p.parseMethodResponse(@cdata_xml))
|
||||
end
|
||||
|
||||
def test_dateTime
|
||||
|
@ -50,7 +51,7 @@ module GenericParserTest
|
|||
# test parseMethodCall ------------------------------------------------------
|
||||
|
||||
def test_parseMethodCall
|
||||
assert_equal(@expected4, @p.parseMethodCall(@xml4).inspect)
|
||||
assert_equal(@expected4, @p.parseMethodCall(@xml4))
|
||||
end
|
||||
|
||||
# test fault ----------------------------------------------------------------
|
||||
|
|
Загрузка…
Ссылка в новой задаче