From: "U.Nakamura" Date: 2004-11-16T10:48:49+09:00 Subject: patch for test/xmlrpc Hello. I found that I could not run test/xmlrpc/test_parser.rb on other directory where the test file exists. Following patch repairs this problem. Index: test_parser.rb =================================================================== RCS file: /home/cvs/ruby/test/xmlrpc/test_parser.rb,v retrieving revision 1.2 diff -u -1 -p -r1.2 test_parser.rb --- test_parser.rb 16 Nov 2004 01:11:49 -0000 1.2 +++ test_parser.rb 16 Nov 2004 01:45:05 -0000 @@ -6,22 +6,26 @@ require "xmlrpc/parser" module GenericParserTest + def datafile(base) + File.join(File.dirname(__FILE__), "data", base) + end + def setup - @xml1 = File.read("data/xml1.xml") - @expected1 = File.read("data/xml1.expected").chomp + @xml1 = File.read(datafile("xml1.xml")) + @expected1 = File.read(datafile("xml1.expected")).chomp - @xml2 = File.read("data/bug_covert.xml") - @expected2 = File.read("data/bug_covert.expected").chomp + @xml2 = File.read(datafile("bug_covert.xml")) + @expected2 = File.read(datafile("bug_covert.expected")).chomp - @xml3 = File.read("data/bug_bool.xml") - @expected3 = File.read("data/bug_bool.expected").chomp + @xml3 = File.read(datafile("bug_bool.xml")) + @expected3 = File.read(datafile("bug_bool.expected")).chomp - @xml4 = File.read("data/value.xml") - @expected4 = File.read("data/value.expected").chomp + @xml4 = File.read(datafile("value.xml")) + @expected4 = File.read(datafile("value.expected")).chomp - @cdata_xml = File.read("data/bug_cdata.xml").chomp - @cdata_expected = File.read("data/bug_cdata.expected").chomp + @cdata_xml = File.read(datafile("bug_cdata.xml")).chomp + @cdata_expected = File.read(datafile("bug_cdata.expected")).chomp - @datetime_xml = File.read("data/datetime_iso8601.xml") + @datetime_xml = File.read(datafile("datetime_iso8601.xml")) @datetime_expected = XMLRPC::DateTime.new(2004, 11, 5, 1, 15, 23) - @fault_doc = File.read("data/fault.xml").to_s + @fault_doc = File.read(datafile("fault.xml")).to_s end BTW, test/xmlrpc/test_features.rb says many "warning: already initialized constant" message. Any ideas? Regards, -- U.Nakamura