1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/lib/envutil.rb: Moved from test/ruby/.

* test/lib/find_executable.rb: Ditto.

* test/lib/memory_status.rb: Ditto.

* test/lib/test/unit.rb: require envutil.

* test/: Don't require envutil in test files.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2014-11-13 16:05:37 +00:00
parent 2e8f953d68
commit fb2008a73a
121 changed files with 18 additions and 124 deletions

View file

@ -1,3 +1,15 @@
Fri Nov 14 01:03:17 2014 Tanaka Akira <akr@fsij.org>
* test/lib/envutil.rb: Moved from test/ruby/.
* test/lib/find_executable.rb: Ditto.
* test/lib/memory_status.rb: Ditto.
* test/lib/test/unit.rb: require envutil.
* test/: Don't require envutil in test files.
Thu Nov 13 21:59:58 2014 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
* lib/rexml/document.rb: add REXML::Document#document.

View file

@ -1,6 +1,5 @@
require 'test/unit'
require 'tmpdir'
require_relative "../../ruby/envutil"
class TestBugReporter < Test::Unit::TestCase
def test_bug_reporter_add

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative '../../ruby/envutil'
module Bug
class TestException < Test::Unit::TestCase

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative '../../ruby/envutil'
module Bug
class Bug7802 < RuntimeError

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative '../../ruby/envutil'
require '-test-/marshal/usr'
module Bug end

View file

@ -1,6 +1,5 @@
require 'test/unit'
require "-test-/string/string"
require_relative '../../ruby/envutil'
class Test_StringModifyExpand < Test::Unit::TestCase
def test_modify_expand_memory_leak

View file

@ -1,6 +1,5 @@
require 'test/unit'
require "-test-/struct"
require_relative '../../ruby/envutil'
class Bug::Struct::Test_Member < Test::Unit::TestCase
S = Bug::Struct.new(:a)

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative '../ruby/envutil'
class Test_BUG_3571 < Test::Unit::TestCase
def test_block_call_id

View file

@ -1,6 +1,5 @@
# -*- coding: us-ascii -*-
require 'test/unit'
require_relative '../ruby/envutil'
class TestRecursion < Test::Unit::TestCase
require '-test-/recursion'

View file

@ -1,6 +1,5 @@
require 'test/unit'
require '-test-/tracepoint'
require_relative '../../ruby/envutil'
class TestTracepointObj < Test::Unit::TestCase
def test_not_available_from_ruby

View file

@ -1,7 +1,6 @@
require 'test/unit'
require 'tmpdir'
require 'rbconfig'
require_relative '../../ruby/envutil'
module Bug
module Win32

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative '../../ruby/envutil'
module Bug
module Win32

View file

@ -1,5 +1,4 @@
require_relative "testbase"
require_relative "../ruby/envutil"
require 'bigdecimal/math'
require 'thread'

View file

@ -1,5 +1,4 @@
require_relative "testbase"
require_relative "../ruby/envutil"
require "bigdecimal/math"
class TestBigMath < Test::Unit::TestCase

View file

@ -2,7 +2,6 @@ require 'test/unit'
require 'cgi'
require 'tempfile'
require 'stringio'
require_relative '../ruby/envutil'
##

View file

@ -3,7 +3,6 @@ require 'drb/drb'
require 'drb/extservm'
require 'timeout'
require 'shellwords'
require_relative '../ruby/envutil'
module DRbTests

View file

@ -1,7 +1,6 @@
# -*- coding: us-ascii -*-
require 'test/unit'
require 'tempfile'
require_relative '../ruby/envutil'
if Process.euid == 0
ok = true

View file

@ -2,7 +2,6 @@ require 'minitest/autorun'
require 'fiddle'
# FIXME: this is stolen from DL and needs to be refactored.
require_relative '../ruby/envutil'
libc_so = libm_so = nil

View file

@ -1,6 +1,5 @@
begin
require_relative 'helper'
require_relative '../ruby/envutil'
rescue LoadError
end

View file

@ -1,6 +1,5 @@
begin
require_relative 'helper'
require_relative '../ruby/envutil'
rescue LoadError
end

View file

@ -1,6 +1,5 @@
begin
require_relative 'helper'
require_relative '../ruby/envutil'
rescue LoadError
end

View file

@ -6,7 +6,6 @@ require_relative 'fileasserts'
require 'pathname'
require 'tmpdir'
require 'test/unit'
require_relative '../ruby/envutil'
class TestFileUtils < Test::Unit::TestCase
TMPROOT = "#{Dir.tmpdir}/fileutils.rb.#{$$}"

View file

@ -7,7 +7,6 @@ if defined? GDBM
require 'test/unit'
require 'tmpdir'
require 'fileutils'
require_relative '../ruby/envutil'
class TestGDBM_RDONLY < Test::Unit::TestCase
def TestGDBM_RDONLY.uname_s

View file

@ -4,7 +4,6 @@ begin
require 'pty'
rescue LoadError
end
require_relative '../../ruby/envutil'
class TestIO_Console < Test::Unit::TestCase
Bug6116 = '[ruby-dev:45309]'

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative '../ruby/envutil'
module TestIRB
class TestCompletion < Test::Unit::TestCase

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative '../ruby/envutil'
module TestIRB
class TestOption < Test::Unit::TestCase

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative '../ruby/envutil'
module TestIRB
class TestRaiseNoBacktraceException < Test::Unit::TestCase

View file

@ -215,7 +215,6 @@ EOT
end
def test_gc
require_relative '../ruby/envutil.rb'
assert_in_out_err(%w[-rjson --disable-gems], <<-EOS, [], [])
bignum_too_long_to_embed_as_string = 1234567890123456789012345
expect = bignum_too_long_to_embed_as_string.to_s

View file

@ -1,7 +1,6 @@
# -*- coding: us-ascii -*-
require "open3"
require "timeout"
require "test/unit"
require_relative "find_executable"
module EnvUtil
@ -357,7 +356,7 @@ module Test
line -= 5 # lines until src
src = <<eom
# -*- coding: #{src.encoding}; -*-
require #{__dir__.dump}'/envutil';include Test::Unit::Assertions
require #{__dir__.dump}'/test/unit';include Test::Unit::Assertions
END {
puts [Marshal.dump($!)].pack('m'), "assertions=\#{self._assertions}"
}

View file

@ -60,7 +60,7 @@ module Memory
end
else
PAT = /^\s*(\d+)\s+(\d+)$/
require_relative 'find_executable'
require_relative '../lib/find_executable'
if PSCMD = EnvUtil.find_executable("ps", "-ovsz=", "-orss=", "-p", $$.to_s) {|out| PAT =~ out}
PSCMD.pop
end

View file

@ -4,6 +4,7 @@ rescue Gem::LoadError
end
require 'minitest/unit'
require 'test/unit/assertions'
require_relative '../envutil'
require 'test/unit/testcase'
require 'optparse'

View file

@ -3,7 +3,6 @@ require 'test/unit'
require 'logger'
require 'tempfile'
require 'tmpdir'
require_relative '../ruby/envutil'
class TestLogDevice < Test::Unit::TestCase
class LogExcnRaiser

View file

@ -2,7 +2,6 @@ $extmk = true
require 'test/unit'
require 'mkmf'
require_relative '../ruby/envutil'
class TestMkmf < Test::Unit::TestCase
class TestConfig < Test::Unit::TestCase

View file

@ -3,7 +3,6 @@ require 'test/unit'
require 'net/http'
require 'stringio'
require_relative 'utils'
require_relative '../../ruby/envutil'
class TestNetHTTP < Test::Unit::TestCase

View file

@ -1,6 +1,5 @@
require "test/unit"
require "objspace"
require_relative "../ruby/envutil"
class TestObjSpace < Test::Unit::TestCase
def test_memsize_of

View file

@ -1,4 +1,3 @@
require_relative "../ruby/envutil"
require_relative "utils"
if defined?(OpenSSL)

View file

@ -12,7 +12,6 @@ require "digest/md5"
require 'tempfile'
require "rbconfig"
require "socket"
require_relative '../ruby/envutil'
module OpenSSL::TestUtils
TEST_KEY_RSA1024 = OpenSSL::PKey::RSA.new <<-_end_of_pem_

View file

@ -5,7 +5,6 @@ require 'fileutils'
require 'tmpdir'
require 'enumerator'
require_relative '../ruby/envutil'
class TestPathname < Test::Unit::TestCase
def self.define_assertion(name, linenum, &block)

View file

@ -13,7 +13,6 @@ require File.expand_path('../file_creation', __FILE__)
begin
require_relative '../ruby/envutil'
require_relative 'support/ruby_runner'
require_relative 'support/rakefile_definitions'
rescue NoMethodError, LoadError

View file

@ -509,7 +509,6 @@ class TestReadline < Test::Unit::TestCase
def assert_under_utf8
return false if ENV['LC_ALL'] == 'UTF-8'
loc = caller_locations(1, 1)[0].base_label.to_s
require_relative "../ruby/envutil"
assert_separately([{"LC_ALL"=>"UTF-8"}, "-r", __FILE__], <<SRC)
#skip "test \#{ENV['LC_ALL']}"
#{self.class.name}.new(#{loc.dump}).run(Test::Unit::Runner.new)

View file

@ -488,7 +488,6 @@ class TupleSpaceProxyTest < Test::Unit::TestCase
end
def test_take_bug_8215
require_relative '../ruby/envutil'
service = DRb.start_service(nil, @ts_base)
uri = service.uri

View file

@ -1,11 +1,10 @@
require 'test/unit'
require_relative '../ruby/envutil'
module TestRipper; end
class TestRipper::Generic < Test::Unit::TestCase
def test_parse_files
srcdir = File.expand_path("../../..", __FILE__)
assert_separately(%W[--disable-gem -rripper -r#{__dir__}/../ruby/envutil - #{srcdir}],
assert_separately(%W[--disable-gem -rripper - #{srcdir}],
__FILE__, __LINE__, <<-'eom', timeout: Float::INFINITY)
TEST_RATIO = 0.05 # testing all files needs too long time...
class Parser < Ripper

View file

@ -1,6 +1,5 @@
begin
require_relative 'dummyparser'
require_relative '../ruby/envutil'
require 'test/unit'
ripper_test = true
module TestRipper; end

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative 'envutil'
class TestAlias < Test::Unit::TestCase
class Alias0

View file

@ -3,7 +3,6 @@ require 'timeout'
require 'tmpdir'
require 'tempfile'
require 'fileutils'
require_relative 'envutil'
class TestArgf < Test::Unit::TestCase
def setup

View file

@ -1,6 +1,5 @@
# coding: US-ASCII
require 'test/unit'
require_relative 'envutil'
class TestArray < Test::Unit::TestCase
def setup

View file

@ -1,7 +1,6 @@
require 'test/unit'
require 'tempfile'
require 'thread'
require_relative 'envutil'
class TestAutoload < Test::Unit::TestCase
def test_autoload_so

View file

@ -1,7 +1,6 @@
require 'test/unit'
require 'tempfile'
require 'timeout'
require_relative 'envutil'
class TestBeginEndBlock < Test::Unit::TestCase
DIR = File.dirname(File.expand_path(__FILE__))

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative 'envutil.rb'
class TestCase < Test::Unit::TestCase
def test_case

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative 'envutil'
class TestClass < Test::Unit::TestCase
# ------------------

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative 'envutil'
class TestComparable < Test::Unit::TestCase
def setup

View file

@ -1,6 +1,5 @@
# -*- coding: us-ascii -*-
require 'test/unit'
require_relative 'envutil'
class TestConst < Test::Unit::TestCase
TEST1 = 1

View file

@ -1,7 +1,6 @@
require 'test/unit'
require 'continuation'
require 'fiber'
require_relative 'envutil'
class TestContinuation < Test::Unit::TestCase
def test_create

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative 'envutil'
class TestDefined < Test::Unit::TestCase
class Foo

View file

@ -1,6 +1,5 @@
require 'test/unit'
require 'tmpdir'
require_relative 'envutil'
class TestDir_M17N < Test::Unit::TestCase
def with_tmpdir

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative 'envutil'
class TestEncodingConverter < Test::Unit::TestCase
def check_ec(edst, esrc, eres, dst, src, ec, off, len, opts=nil)

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative 'envutil'
class TestEncoding < Test::Unit::TestCase

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative 'envutil'
class TestEnumerator < Test::Unit::TestCase
def setup

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative 'envutil'
class TestEnv < Test::Unit::TestCase
IGNORE_CASE = /bccwin|mswin|mingw/ =~ RUBY_PLATFORM

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative 'envutil'
class TestEval < Test::Unit::TestCase

View file

@ -1,6 +1,5 @@
require 'test/unit'
require 'tempfile'
require_relative 'envutil'
class TestException < Test::Unit::TestCase
def test_exception_rescued

View file

@ -2,7 +2,6 @@ require 'test/unit'
require 'fiber'
require 'continuation'
require 'tmpdir'
require_relative './envutil'
class TestFiber < Test::Unit::TestCase
def test_normal

View file

@ -1,7 +1,6 @@
require 'test/unit'
require 'tempfile'
require "thread"
require_relative 'envutil'
require_relative 'ut_eof'
class TestFile < Test::Unit::TestCase

View file

@ -1,7 +1,6 @@
require "test/unit"
require "fileutils"
require "tmpdir"
require_relative "envutil"
class TestFileExhaustive < Test::Unit::TestCase
DRIVE = Dir.pwd[%r'\A(?:[a-z]:|//[^/]+/[^/]+)'i]

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative 'envutil'
class TestFlip < Test::Unit::TestCase
def test_hidden_key

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative 'envutil'
class TestFloat < Test::Unit::TestCase
include EnvUtil

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative 'envutil'
class TestFnmatch < Test::Unit::TestCase

View file

@ -1,7 +1,5 @@
require 'test/unit'
require_relative "envutil"
class TestGc < Test::Unit::TestCase
class S
def initialize(a)

View file

@ -1,7 +1,6 @@
# -*- coding: us-ascii -*-
require 'test/unit'
require 'continuation'
require_relative 'envutil'
class TestHash < Test::Unit::TestCase

View file

@ -8,7 +8,6 @@ require 'stringio'
require 'timeout'
require 'tempfile'
require 'weakref'
require_relative 'envutil'
class TestIO < Test::Unit::TestCase
module Feature

View file

@ -2,7 +2,6 @@
require 'test/unit'
require 'tmpdir'
require 'timeout'
require_relative 'envutil'
class TestIO_M17N < Test::Unit::TestCase
ENCS = [

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative 'envutil'
class TestISeq < Test::Unit::TestCase
ISeq = RubyVM::InstructionSequence

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative 'envutil'
class TestKeywordArguments < Test::Unit::TestCase
def f1(str: "foo", num: 424242)

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative 'envutil'
class TestLazyEnumerator < Test::Unit::TestCase
class Step

View file

@ -1,6 +1,5 @@
# -*- coding: us-ascii -*-
require 'test/unit'
require_relative 'envutil'
class TestRubyLiteral < Test::Unit::TestCase

View file

@ -1,6 +1,5 @@
# coding: US-ASCII
require 'test/unit'
require_relative 'envutil'
class TestM17N < Test::Unit::TestCase
def assert_encoding(encname, actual, message=nil)

View file

@ -1,6 +1,5 @@
# -*- coding: us-ascii -*-
require 'test/unit'
require_relative 'envutil'
class TestMethod < Test::Unit::TestCase
def setup

View file

@ -1,6 +1,5 @@
require 'test/unit'
require 'pp'
require_relative 'envutil'
$m0 = Module.nesting

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative 'envutil'
class TestNumeric < Test::Unit::TestCase
class DummyNumeric < Numeric

View file

@ -1,6 +1,5 @@
# -*- coding: us-ascii -*-
require 'test/unit'
require_relative 'envutil'
class TestObject < Test::Unit::TestCase
def setup

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative 'envutil'
class TestObjectSpace < Test::Unit::TestCase
def self.deftest_id2ref(obj)

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative 'envutil'
class TestProc < Test::Unit::TestCase
def setup

View file

@ -2,7 +2,6 @@ require 'test/unit'
require 'tempfile'
require 'timeout'
require 'io/wait'
require_relative 'envutil'
require 'rbconfig'
class TestProcess < Test::Unit::TestCase

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative 'envutil'
class TestRand < Test::Unit::TestCase
def assert_random_int(ws, m, init = 0)

View file

@ -2,7 +2,6 @@ require 'test/unit'
require 'delegate'
require 'timeout'
require 'bigdecimal'
require_relative 'envutil'
class TestRange < Test::Unit::TestCase
def test_range_string

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative 'envutil'
# to supress warnings for future calls of Module#refine
EnvUtil.suppress_warning do

View file

@ -1,6 +1,5 @@
# coding: US-ASCII
require 'test/unit'
require_relative 'envutil'
class TestRegexp < Test::Unit::TestCase
def setup

View file

@ -1,7 +1,6 @@
require 'test/unit'
require 'tempfile'
require_relative 'envutil'
require 'tmpdir'
class TestRequire < Test::Unit::TestCase

View file

@ -4,8 +4,6 @@ require 'test/unit'
require 'tmpdir'
require 'tempfile'
require_relative 'envutil'
class TestRubyOptions < Test::Unit::TestCase
def write_file(filename, content)
File.open(filename, "w") {|f|

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative 'envutil'
class TestSetTraceFunc < Test::Unit::TestCase
def setup

View file

@ -1,7 +1,6 @@
require 'test/unit'
require 'timeout'
require 'tempfile'
require_relative 'envutil'
class TestSignal < Test::Unit::TestCase
def test_signal

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative 'envutil'
# use of $= is deprecated after 1.7.1
def pre_1_7_1

View file

@ -1,7 +1,6 @@
# -*- coding: us-ascii -*-
require 'test/unit'
require 'timeout'
require_relative 'envutil'
module TestStruct
def test_struct

View file

@ -1,5 +1,4 @@
require 'test/unit'
require_relative 'envutil'
class TestSuper < Test::Unit::TestCase
class Base

View file

@ -1,11 +1,10 @@
require 'test/unit'
require_relative 'envutil'
class TestSyntax < Test::Unit::TestCase
def assert_syntax_files(test)
srcdir = File.expand_path("../../..", __FILE__)
srcdir = File.join(srcdir, test)
assert_separately(%W[--disable-gem -r#{__dir__}/envutil - #{srcdir}],
assert_separately(%W[--disable-gem - #{srcdir}],
__FILE__, __LINE__, <<-'eom', timeout: Float::INFINITY)
dir = ARGV.shift
for script in Dir["#{dir}/**/*.rb"].sort

View file

@ -1,6 +1,5 @@
require 'test/unit'
require 'tmpdir'
require_relative 'envutil'
class TestSystem < Test::Unit::TestCase
def test_system

View file

@ -1,7 +1,6 @@
# -*- coding: us-ascii -*-
require 'test/unit'
require 'thread'
require_relative 'envutil'
class TestThread < Test::Unit::TestCase
class Thread < ::Thread
@ -124,7 +123,6 @@ class TestThread < Test::Unit::TestCase
dir = File.dirname(__FILE__)
lbtest = File.join(dir, "lbtest.rb")
$:.unshift File.join(File.dirname(dir), 'ruby')
require 'envutil'
$:.shift
3.times {
`#{EnvUtil.rubybin} #{lbtest}`

View file

@ -1,6 +1,5 @@
require 'test/unit'
require 'thread'
require_relative 'envutil'
class TestThreadGroup < Test::Unit::TestCase
def test_thread_init

View file

@ -2,7 +2,6 @@ require 'test/unit'
require 'delegate'
require 'timeout'
require 'delegate'
require_relative 'envutil'
class TestTime < Test::Unit::TestCase
def setup

Some files were not shown because too many files have changed in this diff Show more