[#3726] Fixnum#clone and Float#clone raise different exceptions — "David A. Black" <dblack@...>

Hi --

15 messages 2004/11/12
[#3749] Re: Fixnum#clone and Float#clone raise different exceptions — "David A. Black" <dblack@...> 2004/11/16

Hi --

[#3751] Re: Fixnum#clone and Float#clone raise different exceptions — Yukihiro Matsumoto <matz@...> 2004/11/16

Hi,

[#3752] Re: Fixnum#clone and Float#clone raise different exceptions — "David A. Black" <dblack@...> 2004/11/16

Hi --

[#3785] The latest 1.8.2 cvs prints parse error when starting extension compiling — Yukihiro Matsumoto <matz@...>

Hi,

13 messages 2004/11/23
[#3787] Re: The latest 1.8.2 cvs prints parse error when starting extension compiling — Johan Holmberg <holmberg@...> 2004/11/23

patch for test/xmlrpc

From: "U.Nakamura" <usa@...>
Date: 2004-11-16 01:48:49 UTC
List: ruby-core #3744
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 <usa@garbagecollect.jp>



In This Thread

Prev Next