[前][次][番号順一覧][スレッド一覧]

ruby-changes:18844

From: kosaki <ko1@a...>
Date: Mon, 14 Feb 2011 17:50:01 +0900 (JST)
Subject: [ruby-changes:18844] Ruby:r30869 (trunk): * test/ruby/test_system.rb (TestSystem#test_system_at):

kosaki	2011-02-14 17:49:55 +0900 (Mon, 14 Feb 2011)

  New Revision: 30869

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30869

  Log:
    * test/ruby/test_system.rb (TestSystem#test_system_at):
      added test. [ruby-core:35218] (#4393)

  Modified files:
    trunk/test/ruby/test_system.rb

Index: test/ruby/test_system.rb
===================================================================
--- test/ruby/test_system.rb	(revision 30868)
+++ test/ruby/test_system.rb	(revision 30869)
@@ -91,7 +91,20 @@
   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
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]