diff options
| author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-12 14:44:54 +0000 |
|---|---|---|
| committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-12 14:44:54 +0000 |
| commit | e4dbfc4cae378b0f262e5ae6ce30f1c8cba2fa62 (patch) | |
| tree | 15166c3addf31d91c1c0a175f57732ac4fa6f99a /test | |
| parent | aa2d3e79a3639a45022a545310a1ca5f5b4e5673 (diff) | |
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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@24046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
| -rw-r--r-- | test/ruby/test_system.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/ruby/test_system.rb b/test/ruby/test_system.rb index ec8aca74c..0b3b243b1 100644 --- a/test/ruby/test_system.rb +++ b/test/ruby/test_system.rb @@ -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 |
