Skip to content

Commit

Permalink
* spec/ruby/command_line/dash_upper_i_spec.rb: skip symlink on Window…
Browse files Browse the repository at this point in the history
…s like

  other specs.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
unak committed Apr 29, 2018
1 parent de2bfd3 commit 6199c9a
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions spec/ruby/command_line/dash_upper_i_spec.rb
Expand Up @@ -31,19 +31,21 @@
end
end

describe "The -I command line option" do
before :each do
@script = fixture __FILE__, "loadpath.rb"
@fixtures = File.dirname(@script)
@symlink = tmp("loadpath_symlink")
File.symlink(@fixtures, @symlink)
end
platform_is_not :windows do
describe "The -I command line option" do
before :each do
@script = fixture __FILE__, "loadpath.rb"
@fixtures = File.dirname(@script)
@symlink = tmp("loadpath_symlink")
File.symlink(@fixtures, @symlink)
end

after :each do
rm_r @symlink
end
after :each do
rm_r @symlink
end

it "does not expand symlinks" do
ruby_exe(@script, options: "-I #{@symlink}").lines.should include "#{@symlink}\n"
it "does not expand symlinks" do
ruby_exe(@script, options: "-I #{@symlink}").lines.should include "#{@symlink}\n"
end
end
end

1 comment on commit 6199c9a

@Daren-J-Smith
Copy link

@Daren-J-Smith Daren-J-Smith commented on 6199c9a Nov 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not seem to be an ideal solution for this issue. Any programs dependent on symbolic linking on a windows platform will run through this as though they succeeded with a failure in the desired end result. Having the failure is frustrating, but informative to the user. Why not have the test expect the failure condition as a known limitation?

Please sign in to comment.