Debian Codegraph @

test/-ext-/file/test_stat.rb

raw
1 # frozen_string_literal: false
2 require 'test/unit'
3 require "-test-/file"
4
5 class Test_FileStat < Test::Unit::TestCase
6 def test_stat_for_fd
7 st = open(__FILE__) {|f| Bug::File::Stat.for_fd(f.fileno)}
8 assert_equal(File.stat(__FILE__), st)
9 end
10
11 def test_stat_for_path
12 st = Bug::File::Stat.for_path(__FILE__)
13 assert_equal(File.stat(__FILE__), st)
14 end
15 end