1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

File::Stat uses Time#inspect

This commit is contained in:
Nobuyoshi Nakada 2019-07-11 19:45:03 +09:00
parent 71ead07872
commit cd069df365
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -15,10 +15,10 @@ describe "File::Stat#inspect" do
st = File.stat(@file)
expected = "#<File::Stat dev=0x#{st.dev.to_s(16)}, ino=#{st.ino}, mode=#{sprintf("%07o", st.mode)}, nlink=#{st.nlink}"
expected << ", uid=#{st.uid}, gid=#{st.gid}, rdev=0x#{st.rdev.to_s(16)}, size=#{st.size}, blksize=#{st.blksize.inspect}"
expected << ", blocks=#{st.blocks.inspect}, atime=#{st.atime}, mtime=#{st.mtime}, ctime=#{st.ctime}"
expected << ", blocks=#{st.blocks.inspect}, atime=#{st.atime.inspect}, mtime=#{st.mtime.inspect}, ctime=#{st.ctime.inspect}"
platform_is :netbsd, :freebsd, :darwin do
# Windows has File.birthtime but it's not here since already shown by ctime.
expected << ", birthtime=#{st.birthtime}"
expected << ", birthtime=#{st.birthtime.inspect}"
end
expected << ">"
st.inspect.should == expected