ruby-changes:18079
From: nobu <ko1@a...>
Date: Mon, 6 Dec 2010 23:17:46 +0900 (JST)
Subject: [ruby-changes:18079] Ruby:r30100 (trunk): * test/mkmf/test_find_executable.rb (test_find_executable): use
nobu 2010-12-06 23:17:40 +0900 (Mon, 06 Dec 2010) New Revision: 30100 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30100 Log: * test/mkmf/test_find_executable.rb (test_find_executable): use configured results. Modified files: trunk/ChangeLog trunk/test/mkmf/test_find_executable.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 30099) +++ ChangeLog (revision 30100) @@ -1,5 +1,8 @@ -Mon Dec 6 22:55:10 2010 Nobuyoshi Nakada <nobu@r...> +Mon Dec 6 23:17:36 2010 Nobuyoshi Nakada <nobu@r...> + * test/mkmf/test_find_executable.rb (test_find_executable): use + configured results. + * common.mk (test-build): test for build process. Mon Dec 6 22:47:15 2010 Nobuyoshi Nakada <nobu@r...> Index: test/mkmf/test_find_executable.rb =================================================================== --- test/mkmf/test_find_executable.rb (revision 30099) +++ test/mkmf/test_find_executable.rb (revision 30100) @@ -2,28 +2,18 @@ class TestMkmf class TestFindExecutable < TestMkmf - class F - def do_find_executable(name) - find_executable(name) - end - end - def test_find_executable bug2669 = '[ruby-core:27912]' path, ENV["PATH"] = ENV["PATH"], path ENV["PATH"] = @tmpdir - f = F.new name = "foobar#{$$}#{rand(1000)}" - if /mswin\d|mingw|cygwin/ =~ RUBY_PLATFORM - exts = %w[.exe .com .cmd .bat] - else - exts = [""] - end + exts = mkmf {self.class::CONFIG['EXECUTABLE_EXTS']}.split + exts[0] ||= "" exts.each do |ext| full = name+ext begin open(full, "w") {|ff| ff.chmod(0755)} - result = f.do_find_executable(name) + result = mkmf {find_executable(name)} ensure File.unlink(full) end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/