mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Test both username and uid
* system(, uid: ) takes username or uid * ENV["USER"] may be nil (sudo or jail) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f784e14fce
commit
ba7c9b1cf7
1 changed files with 10 additions and 1 deletions
|
@ -1482,9 +1482,18 @@ class TestProcess < Test::Unit::TestCase
|
|||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue