diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-04-24 00:35:34 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-04-24 00:35:34 +0000 |
commit | ca258c86cfdd9a23b7e2b5d771374c381ac444f7 (patch) | |
tree | 25d247ad0e27f72169ff8f105cc846990ea97d05 /test | |
parent | d8bb478e260d38be340276166e2d5c3a9206219e (diff) | |
download | ruby-ca258c86cfdd9a23b7e2b5d771374c381ac444f7.tar.gz |
file.c: statfs_inspect
* file.c (statfs_inspect): add File::Statfs#inspect method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_file.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_file.rb b/test/ruby/test_file.rb index 2d8c86251f..2767263e07 100644 --- a/test/ruby/test_file.rb +++ b/test/ruby/test_file.rb @@ -400,6 +400,11 @@ class TestFile < Test::Unit::TestCase assert_kind_of String, st.fstypename rescue NotImplementedError end + s = st.inspect + assert_match /\A\#<File::Statfs\b.*>\z/, s + assert_match /\bbsize=\d+\b/, s + assert_match /\bblocks=(?:\d+[,>\/])+\b/, s + assert_match /\bfiles=(?:\d+[,>\/])+\b/, s end end end |