summaryrefslogtreecommitdiff
path: root/test/ruby/test_system.rb
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-02-14 08:49:55 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-02-14 08:49:55 +0000
commit8068d73cc11957c37a6869d4e0325191f7a9a040 (patch)
tree6875831e9a75e5cf55964eab9e88868aee56d63e /test/ruby/test_system.rb
parentcee21ad215f48c3d15f5d5d939fb4ca1c8950f1b (diff)
* 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
Diffstat (limited to 'test/ruby/test_system.rb')
-rw-r--r--test/ruby/test_system.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ruby/test_system.rb b/test/ruby/test_system.rb
index 7f5b81a2de..faf63deba3 100644
--- a/test/ruby/test_system.rb
+++ b/test/ruby/test_system.rb
@@ -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