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

* test/ruby/test_system.rb (TestSystem#test_system_at):

added test. [ruby-core:35218] (#4393)



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kosaki 2011-02-14 08:49:55 +00:00
parent cee21ad215
commit 8068d73cc1

View file

@ -91,7 +91,20 @@ class TestSystem < Test::Unit::TestCase
def test_system_at
if /mswin|mingw/ =~ RUBY_PLATFORM
testname = '[ruby-core:35218]'
# @ + builtin command
assert_equal("foo\n", `@echo foo`, testname);
assert_equal("foo\n", `@@echo foo`, testname);
# @ + non builtin command
Dir.mktmpdir("ruby_script_tmp") {|tmpdir|
tmpfilename = "#{tmpdir}/ruby_script_tmp.#{$$}"
tmp = open(tmpfilename, "w")
tmp.print "foo\nbar\nbaz";
tmp.close
assert_match(/\n.*\nbar\nbaz\n/, `@@find "ba" #{tmpfilename.gsub("/", "\\")}`, testname);
}
end
end