mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
merges r23891 from trunk into ruby_1_9_1.
-- * dln.c (dln_find_1): fix for files with dots. [ruby-dev:38588] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
427da29757
commit
61c0c7ab5d
4 changed files with 45 additions and 14 deletions
|
@ -59,6 +59,28 @@ class TestSystem < Test::Unit::TestCase
|
|||
|
||||
File.unlink tmpfilename or `/bin/rm -f "#{tmpfilename}"`
|
||||
File.unlink "#{tmpfilename}.bak" or `/bin/rm -f "#{tmpfilename}.bak"`
|
||||
|
||||
if /mswin|mingw/ =~ RUBY_PLATFORM
|
||||
testname = '[ruby-dev:38588]'
|
||||
batch = "batch_tmp.#{$$}"
|
||||
tmpfilename = "#{tmpdir}/#{batch}.bat"
|
||||
open(tmpfilename, "wb") {|f| f.print "\r\n"}
|
||||
assert(system(tmpfilename), testname)
|
||||
assert(system("#{tmpdir}/#{batch}"), testname)
|
||||
assert(system(tmpfilename, "1"), testname)
|
||||
assert(system("#{tmpdir}/#{batch}", "1"), testname)
|
||||
begin
|
||||
path = ENV["PATH"]
|
||||
ENV["PATH"] = "#{tmpdir.tr(File::SEPARATOR, File::ALT_SEPARATOR)}#{File::PATH_SEPARATOR + path if path}"
|
||||
assert(system("#{batch}.bat"), testname)
|
||||
assert(system(batch), testname)
|
||||
assert(system("#{batch}.bat", "1"), testname)
|
||||
assert(system(batch, "1"), testname)
|
||||
ensure
|
||||
ENV["PATH"] = path
|
||||
end
|
||||
File.unlink tmpfilename
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue