Class: ZipFsFileStatTest
- Inherits:
-
MiniTest::Test
- Object
- MiniTest::Test
- ZipFsFileStatTest
- Defined in:
- lib/hotplate/gems/rubyzip-1.1.7/test/filesystem/file_stat_test.rb
Instance Method Summary collapse
- #setup ⇒ Object
- #teardown ⇒ Object
- #test_blksize ⇒ Object
- #test_blocks ⇒ Object
- #test_dev ⇒ Object
- #test_ftype ⇒ Object
- #test_gid ⇒ Object
- #test_ino ⇒ Object
- #test_mode ⇒ Object
- #test_nlink ⇒ Object
- #test_rdev ⇒ Object
- #test_rdev_major ⇒ Object
- #test_rdev_minor ⇒ Object
- #test_uid ⇒ Object
Instance Method Details
#setup ⇒ Object
6 7 8 |
# File 'lib/hotplate/gems/rubyzip-1.1.7/test/filesystem/file_stat_test.rb', line 6 def setup @zip_file = ::Zip::File.new("test/data/zipWithDirs.zip") end |
#teardown ⇒ Object
10 11 12 |
# File 'lib/hotplate/gems/rubyzip-1.1.7/test/filesystem/file_stat_test.rb', line 10 def teardown @zip_file.close if @zip_file end |
#test_blksize ⇒ Object
62 63 64 |
# File 'lib/hotplate/gems/rubyzip-1.1.7/test/filesystem/file_stat_test.rb', line 62 def test_blksize assert_nil(@zip_file.file.stat("file1").blksize) end |
#test_blocks ⇒ Object
14 15 16 |
# File 'lib/hotplate/gems/rubyzip-1.1.7/test/filesystem/file_stat_test.rb', line 14 def test_blocks assert_equal(nil, @zip_file.file.stat("file1").blocks) end |
#test_dev ⇒ Object
42 43 44 |
# File 'lib/hotplate/gems/rubyzip-1.1.7/test/filesystem/file_stat_test.rb', line 42 def test_dev assert_equal(0, @zip_file.file.stat("file1").dev) end |
#test_ftype ⇒ Object
30 31 32 33 |
# File 'lib/hotplate/gems/rubyzip-1.1.7/test/filesystem/file_stat_test.rb', line 30 def test_ftype assert_equal("file", @zip_file.file.stat("file1").ftype) assert_equal("directory", @zip_file.file.stat("dir1").ftype) end |
#test_gid ⇒ Object
26 27 28 |
# File 'lib/hotplate/gems/rubyzip-1.1.7/test/filesystem/file_stat_test.rb', line 26 def test_gid assert_equal(0, @zip_file.file.stat("file1").gid) end |
#test_ino ⇒ Object
18 19 20 |
# File 'lib/hotplate/gems/rubyzip-1.1.7/test/filesystem/file_stat_test.rb', line 18 def test_ino assert_equal(0, @zip_file.file.stat("file1").ino) end |
#test_mode ⇒ Object
35 36 37 38 39 40 |
# File 'lib/hotplate/gems/rubyzip-1.1.7/test/filesystem/file_stat_test.rb', line 35 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 |
#test_nlink ⇒ Object
58 59 60 |
# File 'lib/hotplate/gems/rubyzip-1.1.7/test/filesystem/file_stat_test.rb', line 58 def test_nlink assert_equal(1, @zip_file.file.stat("file1").nlink) end |
#test_rdev ⇒ Object
46 47 48 |
# File 'lib/hotplate/gems/rubyzip-1.1.7/test/filesystem/file_stat_test.rb', line 46 def test_rdev assert_equal(0, @zip_file.file.stat("file1").rdev) end |
#test_rdev_major ⇒ Object
50 51 52 |
# File 'lib/hotplate/gems/rubyzip-1.1.7/test/filesystem/file_stat_test.rb', line 50 def test_rdev_major assert_equal(0, @zip_file.file.stat("file1").rdev_major) end |
#test_rdev_minor ⇒ Object
54 55 56 |
# File 'lib/hotplate/gems/rubyzip-1.1.7/test/filesystem/file_stat_test.rb', line 54 def test_rdev_minor assert_equal(0, @zip_file.file.stat("file1").rdev_minor) end |
#test_uid ⇒ Object
22 23 24 |
# File 'lib/hotplate/gems/rubyzip-1.1.7/test/filesystem/file_stat_test.rb', line 22 def test_uid assert_equal(0, @zip_file.file.stat("file1").uid) end |