diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2024-01-12 18:50:31 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2024-01-12 20:02:50 +0900 |
commit | 3113bc8d445c4c24ed3827adfc50bb88c99b6364 (patch) | |
tree | b8f2525917892abc9201c0f6819b15f7c6fb8448 /spec/ruby | |
parent | 3103ed4159240e99614c9789bc0f869574a1f9db (diff) |
stat command is not provided on Windows
Diffstat (limited to 'spec/ruby')
-rw-r--r-- | spec/ruby/core/file/atime_spec.rb | 3 | ||||
-rw-r--r-- | spec/ruby/core/file/ctime_spec.rb | 3 | ||||
-rw-r--r-- | spec/ruby/core/file/mtime_spec.rb | 3 |
3 files changed, 9 insertions, 0 deletions
diff --git a/spec/ruby/core/file/atime_spec.rb b/spec/ruby/core/file/atime_spec.rb index 1b47576e6b..e47e70e5ac 100644 --- a/spec/ruby/core/file/atime_spec.rb +++ b/spec/ruby/core/file/atime_spec.rb @@ -27,6 +27,9 @@ describe "File.atime" do else File.atime(__FILE__).usec.should == 0 end + rescue Errno::ENOENT => e + # Native Windows don't have stat command. + skip e.message end end end diff --git a/spec/ruby/core/file/ctime_spec.rb b/spec/ruby/core/file/ctime_spec.rb index d17ba1a77f..718f26d5cc 100644 --- a/spec/ruby/core/file/ctime_spec.rb +++ b/spec/ruby/core/file/ctime_spec.rb @@ -22,6 +22,9 @@ describe "File.ctime" do else File.ctime(__FILE__).usec.should == 0 end + rescue Errno::ENOENT => e + # Windows don't have stat command. + skip e.message end end diff --git a/spec/ruby/core/file/mtime_spec.rb b/spec/ruby/core/file/mtime_spec.rb index 5304bbf057..0e9c95caee 100644 --- a/spec/ruby/core/file/mtime_spec.rb +++ b/spec/ruby/core/file/mtime_spec.rb @@ -26,6 +26,9 @@ describe "File.mtime" do else File.mtime(__FILE__).usec.should == 0 end + rescue Errno::ENOENT => e + # Windows don't have stat command. + skip e.message end end end |