From: Luis Lavena Date: 2011-09-09T05:57:36+09:00 Subject: [ruby-core:39382] Re: RubySpec vs CRuby's test/... On Thu, Sep 8, 2011 at 5:34 PM, Masaya TARUI wrote: > Hello Luis, > > Does RubySpec work fine on your Windows? > Yes, I have failures due missing guards (platform_is / platform_is_not) > On my environment, there are too many failures and errors. > > 3456 files, 16823 examples, 220283 expectations, 99 failures, 608 errors > ( ruby 1.9.4dev (2011-09-06 trunk 33199) [i386-mswin32_100] ) > Most of the times is due missing guards and sometimes is missing lot of Windows specific code. Please see my rant at the bottom [1] > It seems not to consider portability. > For Instance, temporary directory is assumed to be / tmp . > Hmn, sounds hardcoded, for comparison, file/expand_path_spec.rb: before :each do platform_is :windows do @base = `cd`.chomp.tr '\\', '/' @tmpdir = "c:/tmp" @rootdir = "c:/" end platform_is_not :windows do @base = Dir.pwd @tmpdir = "/tmp" @rootdir = "/" end end Which is used later on the specs. If that is hardcoded somewhere, is wrong and needs to be corrected. I will happily fix that if you open an issue here: https://github.com/rubyspec/rubyspec/issues > I think that RubySpec is good compatibility check tool on Linux, > but it has to solve portability issues for using as test tool for development. > it looks like to be hard work. > If you're used to a tool, getting full to speed and covering those guards inside other tool can be time challenging and hard work, sure. Now, my rant [1] I'm trying to see if I can improve Ruby performance on Windows, and is really hard to find ANY documentation on the behaviors of certain methods. I was expecting see some test for File.expand_path inside test/test_file.rb but there is none, except a few in test/sample.rb, not to mention the lack of result taint testing or encoding. So, under Windows, neither test/* or RubySpec solves the problem. However, there are *some* specs in RubySpec that did help me more than 4 regex validations that I found in test/sample.rb But honestly, nobody from core really "care" to improve this on Windows and the few that use Ruby on Windows don't have the time to dig into Ruby C code and extract what is the expected behavior of Ruby to add to RubySpec. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup�ry