merges r30284 from trunk into ruby_1_9_2.

--
* test/rexml/test_contrib.rb (ContribTester#test_pos): should not
  use fixed path name for tests.  [ruby-dev:42827]
* test/rexml/test_sax.rb (SAX2Tester#test_socket): should not use
  fixed port for tests.  [ruby-dev:42828]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
yugui 2010-12-23 12:45:53 +00:00
parent a4610baeee
commit a8b6a6f331
4 changed files with 19 additions and 13 deletions

View file

@ -1,3 +1,11 @@
Tue Dec 21 06:25:43 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* test/rexml/test_contrib.rb (ContribTester#test_pos): should not
use fixed path name for tests. [ruby-dev:42827]
* test/rexml/test_sax.rb (SAX2Tester#test_socket): should not use
fixed port for tests. [ruby-dev:42828]
Tue Dec 21 01:41:42 2010 Masaya Tarui <tarui@ruby-lnag.org> Tue Dec 21 01:41:42 2010 Masaya Tarui <tarui@ruby-lnag.org>
* io.c : add an extra byte to buffer for the specification of read * io.c : add an extra byte to buffer for the specification of read

View file

@ -74,7 +74,7 @@ DELIMITER
EOF EOF
doc = REXML::Document.new source doc = REXML::Document.new source
doc.write(out="") doc.write(out="")
assert(out[/>'>/] != nil, "Couldn't find >'>") assert(out[/>\'>/] != nil, "Couldn't find >'>")
assert(out[/\]>/] != nil, "Couldn't find ]>") assert(out[/\]>/] != nil, "Couldn't find ]>")
end end
@ -512,7 +512,8 @@ EOL
end end
def test_pos def test_pos
testfile = "/tmp/tidal#{$$}" require 'tempfile'
testfile = Tempfile.new("tidal")
testdata = %Q{<calibration> testdata = %Q{<calibration>
<section name="parameters"> <section name="parameters">
<param name="barpress">760</param> <param name="barpress">760</param>
@ -521,13 +522,12 @@ EOL
</calibration> </calibration>
} }
File.open(testfile, 'w') do |f| testfile.puts testdata
f.puts testdata testfile.rewind
assert_nothing_raised do
d = REXML::Document.new(testfile)
end end
File.open(testfile) do |f| testfile.close(true)
d = REXML::Document.new(f)
end
#File.unlink(testfile)
end end
def test_deep_clone def test_deep_clone

View file

@ -221,10 +221,8 @@ class SAX2Tester < Test::Unit::TestCase
def test_socket def test_socket
require 'socket' require 'socket'
port = 12345 server = TCPServer.new('127.0.0.1', 0)
socket = TCPSocket.new('127.0.0.1', server.addr[1])
server = TCPServer.new('127.0.0.1', port)
socket = TCPSocket.new('127.0.0.1', port)
ok = false ok = false
session = server.accept session = server.accept

View file

@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.2" #define RUBY_VERSION "1.9.2"
#define RUBY_PATCHLEVEL 127 #define RUBY_PATCHLEVEL 128
#define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_MINOR 9
#define RUBY_VERSION_TEENY 1 #define RUBY_VERSION_TEENY 1