Skip to content

Commit

Permalink
Add a failing test for small files
Browse files Browse the repository at this point in the history
  • Loading branch information
bdwyertech committed Aug 28, 2018
1 parent 6d60cdf commit f7b7755
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions spec/mixlib/tar_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@
expect(extractor.send(:is_tar_archive?, raw)).to eq(false)
end
end
context "invalid small file" do
let(:data) { "testdir/#{Array.new(11) { "\x00" }.join}smallfile" }
it "does not identify an invalid header in a small file" do
extractor = described_class.new(tgz_archive)
expect(extractor.send(:is_tar_archive?, raw)).to eq(false)
end
end
end

end

0 comments on commit f7b7755

Please sign in to comment.