Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Use pwd -P to work on systemlinked locations. #1677

Merged
merged 1 commit into from

2 participants

@ratnikov

Since I have my jruby.git directory in a symlinked directory, I get a failure:

1) Failure:
test_backquote1(TestKernel) [test/test_kernel.rb:589]:
<"/ssd/ratnikov/jruby.git"> expected but was
<"/usr/local/XXX/ratnikov/ssd/jruby.git">.

since Dir.pwd resolves system links and pwd apparently doesn't. Using pwd -P solves this issue.

@enebo enebo merged commit 1fa3fc1 into from
@enebo enebo added this to the JRuby 1.7.13 milestone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 2, 2014
  1. @ratnikov
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 3 deletions.
  1. +3 −3 test/test_kernel.rb
View
6 test/test_kernel.rb
@@ -572,7 +572,7 @@ def test_backquote_with_quotes
if (WINDOWS)
result = `"#{TESTAPP_NONORM}" #{Dir.pwd}`.strip
else
- result = `"pwd" .`.strip
+ result = `""pwd -P"" .`.strip
end
expected = Dir.pwd
assert_equal(expected, result)
@@ -583,7 +583,7 @@ def test_backquote1
result = `cmd /c cd`.strip.gsub('\\', '/').downcase
expected = Dir.pwd.downcase
else
- result = `sh -c pwd`.strip
+ result = `sh -c "pwd -P"`.strip
expected = Dir.pwd
end
assert_equal(expected, result)
@@ -594,7 +594,7 @@ def test_backquote1_1
result = `cmd.exe /c cd`.strip.gsub('\\', '/').downcase
expected = Dir.pwd.downcase
else
- result = `pwd`.strip
+ result = `pwd -P`.strip
expected = Dir.pwd
end
assert_equal(expected, result)
Something went wrong with that request. Please try again.