mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
spec/ruby/security/cve_2018_6914_spec.rb: get rid of leftover files
I ran out of inodes in $TMPDIR :< git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3e93bf3b46
commit
9366d7092f
1 changed files with 12 additions and 9 deletions
|
@ -32,22 +32,25 @@ describe "CVE-2018-6914 is resisted by" do
|
|||
|
||||
it "Tempfile.create by deleting separators" do
|
||||
expect = Dir.glob(@traversal_path + '*').count
|
||||
Tempfile.create(@traversal_path + 'foo')
|
||||
actual = Dir.glob(@traversal_path + '*').count
|
||||
actual.should == expect
|
||||
Tempfile.create(@traversal_path + 'foo') do
|
||||
actual = Dir.glob(@traversal_path + '*').count
|
||||
actual.should == expect
|
||||
end
|
||||
end
|
||||
|
||||
it "Dir.mktmpdir by deleting separators" do
|
||||
expect = Dir.glob(@traversal_path + '*').count
|
||||
Dir.mktmpdir(@traversal_path + 'foo')
|
||||
actual = Dir.glob(@traversal_path + '*').count
|
||||
actual.should == expect
|
||||
Dir.mktmpdir(@traversal_path + 'foo') do
|
||||
actual = Dir.glob(@traversal_path + '*').count
|
||||
actual.should == expect
|
||||
end
|
||||
end
|
||||
|
||||
it "Dir.mktmpdir with an array by deleting separators" do
|
||||
expect = Dir.glob(@traversal_path + '*').count
|
||||
Dir.mktmpdir([@traversal_path, 'foo'])
|
||||
actual = Dir.glob(@traversal_path + '*').count
|
||||
actual.should == expect
|
||||
Dir.mktmpdir([@traversal_path, 'foo']) do
|
||||
actual = Dir.glob(@traversal_path + '*').count
|
||||
actual.should == expect
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue