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

ruby-changes:25078

From: naruse <ko1@a...>
Date: Wed, 10 Oct 2012 17:08:32 +0900 (JST)
Subject: [ruby-changes:25078] naruse:r37130 (trunk): Test both username and uid

naruse	2012-10-10 17:08:22 +0900 (Wed, 10 Oct 2012)

  New Revision: 37130

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

  Log:
    Test both username and uid
    
    * system(, uid: ) takes username or uid
    * ENV["USER"] may be nil (sudo or jail)

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

Index: test/ruby/test_process.rb
===================================================================
--- test/ruby/test_process.rb	(revision 37129)
+++ test/ruby/test_process.rb	(revision 37130)
@@ -1482,9 +1482,18 @@
     feature6975 = '[ruby-core:47414]'
 
     [30000, [ENV["USER"], Process.uid]].each do |user, uid|
+      if user
+        assert_nothing_raised(feature6975) do
+          begin
+            system(*TRUECOMMAND, uid: user)
+          rescue Errno::EPERM, NotImplementedError
+          end
+        end
+      end
+
       assert_nothing_raised(feature6975) do
         begin
-          system(*TRUECOMMAND, uid: user)
+          system(*TRUECOMMAND, uid: uid)
         rescue Errno::EPERM, NotImplementedError
         end
       end

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

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