Sha256: 67f040697e9ee1896963713bba28f73979cfabd302672b72b2e90f72a87388c2
Contents?: true
Size: 1.42 KB
Versions: 26
Compression:
Stored size: 1.42 KB
Contents
require 'test_helper' require 'zip/filesystem' class ZipFsFileStatTest < MiniTest::Test def setup @zip_file = ::Zip::File.new('test/data/zipWithDirs.zip') end def teardown @zip_file.close if @zip_file end def test_blocks assert_nil(@zip_file.file.stat('file1').blocks) end def test_ino assert_equal(0, @zip_file.file.stat('file1').ino) end def test_uid assert_equal(0, @zip_file.file.stat('file1').uid) end def test_gid assert_equal(0, @zip_file.file.stat('file1').gid) end def test_ftype assert_equal('file', @zip_file.file.stat('file1').ftype) assert_equal('directory', @zip_file.file.stat('dir1').ftype) end def test_mode assert_equal(0600, @zip_file.file.stat('file1').mode & 0777) assert_equal(0600, @zip_file.file.stat('file1').mode & 0777) assert_equal(0755, @zip_file.file.stat('dir1').mode & 0777) assert_equal(0755, @zip_file.file.stat('dir1').mode & 0777) end def test_dev assert_equal(0, @zip_file.file.stat('file1').dev) end def test_rdev assert_equal(0, @zip_file.file.stat('file1').rdev) end def test_rdev_major assert_equal(0, @zip_file.file.stat('file1').rdev_major) end def test_rdev_minor assert_equal(0, @zip_file.file.stat('file1').rdev_minor) end def test_nlink assert_equal(1, @zip_file.file.stat('file1').nlink) end def test_blksize assert_nil(@zip_file.file.stat('file1').blksize) end end
Version data entries
26 entries across 20 versions & 4 rubygems