diff --git a/ChangeLog b/ChangeLog index d1b67d1e03..6d08f388cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +Thu Oct 2 00:21:11 2003 NAKAMURA, Hiroshi + + * test/logger/test_logger.rb: unlinking file before close causes + problem under win32 box. + + * lib/xsd/datatypes.rb(XSDFloat, XSDDouble): add +/- sign explicitly + when stringified and embedded into XML instance. Ruby's sprintf may + format -0.0 as "0.0" (no minus sign) depending on underlying C + sprintf implementation. + + * test/xsd/test_xsd.rb, test/soap/test_basetype.rb: follow above change. + + * test/soap/calc/*: give httpd config param "CGIInterpreter". + "/usr/bin/env ruby" thing does not work under non-Unix boxes. + Thu Oct 2 00:25:21 2003 Nobuyoshi Nakada * signal.c (ruby_signal_name): adjust to the prototype. @@ -130,13 +145,6 @@ Mon Sep 29 02:31:44 2003 GOTOU Yuuzou set real and effective IDs. and setup group access list by initgroups. -Mon Sep 27 18:25:13 2003 NAKAMURA, Hiroshi - - * lib/xsd/charset.rb: XSD::Charset.is_ces did return always true under - $KCODE = "NONE" environment. check added. - - * test/xsd/test_xsd.rb: add tests for above fix. - Sun Sep 28 11:14:19 2003 Koji Arai * ext/digest/digest.c (Init_digest): `copy_object' was deprecated. @@ -144,7 +152,14 @@ Sun Sep 28 11:14:19 2003 Koji Arai * ext/stringio/stringio.c (Init_stringio): ditto. -Mon Sep 27 15:58:50 2003 NAKAMURA, Hiroshi +Sat Sep 27 18:25:13 2003 NAKAMURA, Hiroshi + + * lib/xsd/charset.rb: XSD::Charset.is_ces did return always true under + $KCODE = "NONE" environment. check added. + + * test/xsd/test_xsd.rb: add tests for above fix. + +Sat Sep 27 15:58:50 2003 NAKAMURA, Hiroshi * lib/soap/rpc/cgistub.rb: make logging severity threshold higher. @@ -161,7 +176,7 @@ Sat Sep 27 09:44:18 2003 Minero Aoki * test/fileutils/test_nowrite.rb: ditto. -Mon Sep 27 04:57:07 2003 NAKAMURA, Hiroshi +Sat Sep 27 04:57:07 2003 NAKAMURA, Hiroshi * test/ruby/test_file.rb: new file. only asserts unlink-before-close behaviour now. @@ -169,7 +184,7 @@ Mon Sep 27 04:57:07 2003 NAKAMURA, Hiroshi * test/soap/marshal/test_digraph.rb: should close before unlink. unlink-before-close pattern is not needed here. -Mon Sep 27 03:32:37 2003 NAKAMURA, Hiroshi +Sat Sep 27 03:32:37 2003 NAKAMURA, Hiroshi * test/soap/*, test/wsdl/*, test/xsd/*: move TestCase classes into each module namespace. TestMarshal in @@ -185,7 +200,7 @@ Fri Sep 26 18:35:40 2003 Nobuyoshi Nakada * lib/resolv-replace.rb: 1.8 compliance. [ruby-talk:82946] -Mon Sep 26 17:39:27 2003 NAKAMURA, Hiroshi +Fri Sep 26 17:39:27 2003 NAKAMURA, Hiroshi * test/ruby/test_marshal.rb: add test for ruby's objects. @@ -197,7 +212,7 @@ Fri Sep 26 09:52:44 2003 Nobuyoshi Nakada * lib/mkmf.rb (xsystem): use system directly to honor shell meta charaters. -Mon Sep 26 00:10:13 2003 NAKAMURA, Hiroshi +Fri Sep 26 00:10:13 2003 NAKAMURA, Hiroshi * lib/README: updated. @@ -225,7 +240,7 @@ Thu Sep 25 00:23:22 2003 WATANABE Hirofumi * MANIFEST: add SOAP4R. -Mon Sep 25 00:13:15 2003 NAKAMURA, Hiroshi +Thu Sep 25 00:13:15 2003 NAKAMURA, Hiroshi * lib/soap/* (29 files): SOAP4R added. @@ -248,7 +263,7 @@ Wed Sep 24 02:08:11 2003 GOTOU Yuuzou * lib/webrick/httpservlet/cgihandler.rb: conform to mswin32. [ruby-talk:82735], [ruby-talk:82748], [ruby-talk:82818] -Mon Sep 23 23:10:16 2003 NAKAMURA, Hiroshi +Tue Sep 23 23:10:16 2003 NAKAMURA, Hiroshi * lib/logger.rb: add Logger#<<(msg) for writing msg without any formatting. @@ -286,7 +301,7 @@ Sun Sep 21 04:12:36 2003 GOTOU Yuuzou * ext/openssl/ossl_x509ext.c (ossl_x509ext_set_value): ditto. -Mon Sep 20 11:49:05 2003 NAKAMURA, Hiroshi +Sat Sep 20 11:49:05 2003 NAKAMURA, Hiroshi * lib/logger.rb: typo fixed. @@ -329,7 +344,7 @@ Thu Sep 18 20:30:17 2003 Tanaka Akira * lib/pathname.rb: update document. -Mon Sep 18 15:27:05 2003 NAKAMURA, Hiroshi +Thu Sep 18 15:27:05 2003 NAKAMURA, Hiroshi * lib/logger.rb: new file. Logger, formerly called devel-logger or Devel::Logger. @@ -405,7 +420,7 @@ Wed Sep 17 18:03:30 2003 GOTOU Yuuzou * ext/openssl/lib/openssl/x509.c (X509::ExtensionFactory): refine all. -Mon Sep 16 22:25:06 2003 NAKAMURA, Hiroshi +Tue Sep 16 22:25:06 2003 NAKAMURA, Hiroshi * test/csv/test_csv.rb: add negative tests of row_sep. @@ -566,7 +581,7 @@ Sun Sep 7 16:08:28 2003 Hidetoshi NAGAI * ext/tk/lib/*.rb : Ruby/Tk works at $SAFE == 4 -Fri Sep 6 02:26:34 2003 NAKAMURA, Hiroshi +Sat Sep 6 02:26:34 2003 NAKAMURA, Hiroshi * test/ruby/test_*.rb: assert_same, assert_match, and so on. @@ -679,7 +694,7 @@ Fri Sep 5 03:00:04 2003 Nobuyoshi Nakada * test/ruby/test_iterator.rb (test_ljump): uncomment LocalJumpError test. -Wed Sep 5 01:10:11 2003 NAKAMURA, Hiroshi +Fri Sep 5 01:10:11 2003 NAKAMURA, Hiroshi * test/ruby: tests for ruby itself. @@ -689,7 +704,7 @@ Wed Sep 5 01:10:11 2003 NAKAMURA, Hiroshi * test/csv/test_csv.rb: should require 'csv', not '../lib/csv'. test runner should set load path correctly. -Wed Sep 5 01:03:59 2003 NAKAMURA, Hiroshi +Fri Sep 5 01:03:59 2003 NAKAMURA, Hiroshi * test/csv/test_csv.rb: close opened files for CSV::IOBuf explicitly. opened file cannot be removed under win32 box. @@ -700,20 +715,20 @@ Thu Sep 4 23:59:40 2003 Nobuyoshi Nakada %w/%W, otherwise they are ignored only when interpolation is enabled. [ruby-dev:21325] -Wed Sep 4 19:38:25 2003 NAKAMURA, Hiroshi +Thu Sep 4 19:38:25 2003 NAKAMURA, Hiroshi * ext/io/wait/.cvsignore: added. * ext/openssl/.cvsignore: added. -Wed Sep 4 19:28:24 2003 NAKAMURA, Hiroshi +Thu Sep 4 19:28:24 2003 NAKAMURA, Hiroshi * sample/openssl: added. Sample of standard distribution library should be locate in sample/{module_name}/*. * ext/openssl/sample/*: removed. move to sample/openssl/*. -Wed Sep 4 18:02:15 2003 NAKAMURA, Hiroshi +Thu Sep 4 18:02:15 2003 NAKAMURA, Hiroshi * test/csv/test_csv.rb: use remove_const to reduce warnings. use Dir.tmpdir to locate working files. @@ -730,7 +745,7 @@ Thu Sep 4 17:41:31 2003 Nobuyoshi Nakada call `ruby-here-doc-end-match' unless `ruby-here-doc-beg-re' matched. -Wed Sep 4 15:40:07 2003 NAKAMURA, Hiroshi +Thu Sep 4 15:40:07 2003 NAKAMURA, Hiroshi * test/csv/test_csv.rb: run on test/unit original layer. diff --git a/lib/xsd/datatypes.rb b/lib/xsd/datatypes.rb index 03e42d21d2..bb4f53e59a 100644 --- a/lib/xsd/datatypes.rb +++ b/lib/xsd/datatypes.rb @@ -329,7 +329,7 @@ private elsif @data.infinite? == -1 '-INF' else - sprintf("%.10g", @data) + sprintf("%+.10g", @data) end end @@ -397,7 +397,7 @@ private elsif @data.infinite? == -1 '-INF' else - sprintf("%.16g", @data) + sprintf("%+.16g", @data) end end end diff --git a/test/logger/test_logger.rb b/test/logger/test_logger.rb index 9fdd88c27c..e92ec62b80 100644 --- a/test/logger/test_logger.rb +++ b/test/logger/test_logger.rb @@ -247,6 +247,7 @@ class TestLogDevice < Test::Unit::TestCase assert(logdev.dev.sync) assert_equal(filename, logdev.filename) ensure + logdev.close File.unlink(filename) end end diff --git a/test/soap/calc/server.cgi b/test/soap/calc/server.cgi index c4fa687550..1eb0d1d864 100644 --- a/test/soap/calc/server.cgi +++ b/test/soap/calc/server.cgi @@ -1,5 +1,3 @@ -#!/usr/bin/env ruby - require 'soap/rpc/cgistub' class CalcServer < SOAP::RPC::CGIStub diff --git a/test/soap/calc/test_calc_cgi.rb b/test/soap/calc/test_calc_cgi.rb index 6d1204d48c..14b0097bb6 100644 --- a/test/soap/calc/test_calc_cgi.rb +++ b/test/soap/calc/test_calc_cgi.rb @@ -2,6 +2,7 @@ require 'test/unit' require 'soap/rpc/driver' require 'logger' require 'webrick' +require 'rbconfig' module SOAP @@ -9,6 +10,8 @@ module Calc class TestCalcCGI < Test::Unit::TestCase + # This test shuld be run after installing ruby. + RUBYBIN = File.join(Config::CONFIG["bindir"], Config::CONFIG["ruby_install_name"]) def setup logger = Logger.new(STDERR) logger.level = Logger::Severity::FATAL @@ -18,7 +21,8 @@ class TestCalcCGI < Test::Unit::TestCase :Port => 8808, :AccessLog => [], :DocumentRoot => File.dirname(File.expand_path(__FILE__)), - :CGIPathEnv => ENV['PATH'] + :CGIPathEnv => ENV['PATH'], + :CGIInterpreter => RUBYBIN ) @t = Thread.new { @server.start diff --git a/test/soap/test_basetype.rb b/test/soap/test_basetype.rb index 16f211c717..0125f80505 100644 --- a/test/soap/test_basetype.rb +++ b/test/soap/test_basetype.rb @@ -162,9 +162,9 @@ class TestSOAP < Test::Unit::TestCase end targets = [ - "3.141592654", - "1.234e+37", - "1.4e-45", + "+3.141592654", + "+1.234e+37", + "+1.4e-45", "-1.4e-45", ] targets.each do |f| @@ -172,23 +172,23 @@ class TestSOAP < Test::Unit::TestCase end targets = [ - [3, "3"], # should be 3.0? + [3, "+3"], # should be 3.0? [-2, "-2"], # ditto - [3.14159265358979, "3.141592654"], - [12.34e36, "1.234e+37"], - [1.4e-45, "1.4e-45"], + [3.14159265358979, "+3.141592654"], + [12.34e36, "+1.234e+37"], + [1.4e-45, "+1.4e-45"], [-1.4e-45, "-1.4e-45"], - ["1.4e", "1.4"], - ["12.34E36", "1.234e+37"], - ["1.4E-45", "1.4e-45"], + ["1.4e", "+1.4"], + ["12.34E36", "+1.234e+37"], + ["1.4E-45", "+1.4e-45"], ["-1.4E-45", "-1.4e-45"], - ["1.4E", "1.4"], + ["1.4E", "+1.4"], ] targets.each do |f, str| assert_equal(str, SOAP::SOAPFloat.new(f).to_s) end - assert_equal("0", SOAP::SOAPFloat.new(+0.0).to_s) + assert_equal("+0", SOAP::SOAPFloat.new(+0.0).to_s) assert_equal("-0", SOAP::SOAPFloat.new(-0.0).to_s) assert(SOAP::SOAPFloat.new(0.0/0.0).data.nan?) assert_equal("INF", SOAP::SOAPFloat.new(1.0/0.0).to_s) @@ -227,9 +227,9 @@ class TestSOAP < Test::Unit::TestCase end targets = [ - "3.14159265358979", - "1.234e+37", - "1.4e-45", + "+3.14159265358979", + "+1.234e+37", + "+1.4e-45", "-1.4e-45", ] targets.each do |f| @@ -237,23 +237,23 @@ class TestSOAP < Test::Unit::TestCase end targets = [ - [3, "3"], # should be 3.0? + [3, "+3"], # should be 3.0? [-2, "-2"], # ditto. - [3.14159265358979, "3.14159265358979"], - [12.34e36, "1.234e+37"], - [1.4e-45, "1.4e-45"], + [3.14159265358979, "+3.14159265358979"], + [12.34e36, "+1.234e+37"], + [1.4e-45, "+1.4e-45"], [-1.4e-45, "-1.4e-45"], - ["1.4e", "1.4"], - ["12.34E36", "1.234e+37"], - ["1.4E-45", "1.4e-45"], + ["1.4e", "+1.4"], + ["12.34E36", "+1.234e+37"], + ["1.4E-45", "+1.4e-45"], ["-1.4E-45", "-1.4e-45"], - ["1.4E", "1.4"], + ["1.4E", "+1.4"], ] targets.each do |f, str| assert_equal(str, SOAP::SOAPDouble.new(f).to_s) end - assert_equal("0", SOAP::SOAPFloat.new(+0.0).to_s) + assert_equal("+0", SOAP::SOAPFloat.new(+0.0).to_s) assert_equal("-0", SOAP::SOAPFloat.new(-0.0).to_s) assert_equal("NaN", SOAP::SOAPDouble.new(0.0/0.0).to_s) assert(SOAP::SOAPDouble.new(0.0/0.0).data.nan?) diff --git a/test/xsd/test_xsd.rb b/test/xsd/test_xsd.rb index 818ad51988..88191bb7f1 100644 --- a/test/xsd/test_xsd.rb +++ b/test/xsd/test_xsd.rb @@ -195,9 +195,9 @@ class TestXSD < Test::Unit::TestCase end targets = [ - "3.141592654", - "1.234e+37", - "1.4e-45", + "+3.141592654", + "+1.234e+37", + "+1.4e-45", "-1.4e-45", ] targets.each do |f| @@ -205,23 +205,23 @@ class TestXSD < Test::Unit::TestCase end targets = [ - [3, "3"], # should be 3.0? + [3, "+3"], # should be 3.0? [-2, "-2"], # ditto - [3.14159265358979, "3.141592654"], - [12.34e36, "1.234e+37"], - [1.4e-45, "1.4e-45"], + [3.14159265358979, "+3.141592654"], + [12.34e36, "+1.234e+37"], + [1.4e-45, "+1.4e-45"], [-1.4e-45, "-1.4e-45"], - ["1.4e", "1.4"], - ["12.34E36", "1.234e+37"], - ["1.4E-45", "1.4e-45"], + ["1.4e", "+1.4"], + ["12.34E36", "+1.234e+37"], + ["1.4E-45", "+1.4e-45"], ["-1.4E-45", "-1.4e-45"], - ["1.4E", "1.4"], + ["1.4E", "+1.4"], ] targets.each do |f, str| assert_equal(str, XSD::XSDFloat.new(f).to_s) end - assert_equal("0", XSD::XSDFloat.new(+0.0).to_s) + assert_equal("+0", XSD::XSDFloat.new(+0.0).to_s) assert_equal("-0", XSD::XSDFloat.new(-0.0).to_s) assert(XSD::XSDFloat.new(0.0/0.0).data.nan?) assert_equal("INF", XSD::XSDFloat.new(1.0/0.0).to_s) @@ -260,9 +260,9 @@ class TestXSD < Test::Unit::TestCase end targets = [ - "3.14159265358979", - "1.234e+37", - "1.4e-45", + "+3.14159265358979", + "+1.234e+37", + "+1.4e-45", "-1.4e-45", ] targets.each do |f| @@ -270,23 +270,23 @@ class TestXSD < Test::Unit::TestCase end targets = [ - [3, "3"], # should be 3.0? + [3, "+3"], # should be 3.0? [-2, "-2"], # ditto. - [3.14159265358979, "3.14159265358979"], - [12.34e36, "1.234e+37"], - [1.4e-45, "1.4e-45"], + [3.14159265358979, "+3.14159265358979"], + [12.34e36, "+1.234e+37"], + [1.4e-45, "+1.4e-45"], [-1.4e-45, "-1.4e-45"], - ["1.4e", "1.4"], - ["12.34E36", "1.234e+37"], - ["1.4E-45", "1.4e-45"], + ["1.4e", "+1.4"], + ["12.34E36", "+1.234e+37"], + ["1.4E-45", "+1.4e-45"], ["-1.4E-45", "-1.4e-45"], - ["1.4E", "1.4"], + ["1.4E", "+1.4"], ] targets.each do |f, str| assert_equal(str, XSD::XSDDouble.new(f).to_s) end - assert_equal("0", XSD::XSDFloat.new(+0.0).to_s) + assert_equal("+0", XSD::XSDFloat.new(+0.0).to_s) assert_equal("-0", XSD::XSDFloat.new(-0.0).to_s) assert_equal("NaN", XSD::XSDDouble.new(0.0/0.0).to_s) assert(XSD::XSDDouble.new(0.0/0.0).data.nan?)