Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c1b7ea0859e0
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ea9411cc9651
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Jun 9, 2015

  1. Copy the full SHA
    e091e9d View commit details
  2. removed test for none existing feature

    commit f5d1f9b remove the feature to
    load files with .jar.rb extensions
    mkristian committed Jun 9, 2015
    Copy the full SHA
    ea9411c View commit details
Showing with 9 additions and 11 deletions.
  1. 0 test/jruby/fake.jar.rb
  2. +6 −9 test/jruby/test_dir.rb
  3. +3 −2 test/jruby/test_load.rb
Empty file removed test/jruby/fake.jar.rb
Empty file.
15 changes: 6 additions & 9 deletions test/jruby/test_dir.rb
Original file line number Diff line number Diff line change
@@ -135,26 +135,24 @@ def test_chdir_and_pwd
pwd.gsub! '\\', '/'
assert_equal("testDir_4", pwd.split("/")[-1].strip)
end
pend 'FIXME: been commented out on 9K (works on 1.7) - please review'
pwd = `java -cp "#{java_test_classes}" org.jruby.util.Pwd`
pwd = `#{RUBY} -e "puts ENV_JAVA['user.dir']"`
pwd.gsub! '\\', '/'
assert_equal("testDir_4", pwd.split("/")[-1].strip)
end
Dir.chdir("testDir_4")
pend 'FIXME: been commented out on 9K (works on 1.7) - please review'
pwd = `java -cp "#{java_test_classes}" org.jruby.util.Pwd`
pwd = `#{RUBY} -e "puts ENV_JAVA['user.dir']"`
pwd.gsub! '\\', '/'
assert_equal("testDir_4", pwd.split("/")[-1].strip)
end

def test_glob_inside_jar_file
pend 'FIXME: needs more work after merge - (@mkristian) please review'
jar_file = jar_file_with_spaces

["#{jar_file}/abc", "#{jar_file}/inside_jar.rb", "#{jar_file}/second_jar.rb"].each do |f|
prefix = 'uri:classloader:'
["#{prefix}/abc", "#{prefix}/inside_jar.rb", "#{prefix}/second_jar.rb"].each do |f|
assert $__glob_value.include?(f), "#{f} not found in #{$__glob_value.inspect}"
end
["#{jar_file}/abc", "#{jar_file}/abc/foo.rb", "#{jar_file}/inside_jar.rb", "#{jar_file}/second_jar.rb"].each do |f|
["#{prefix}/abc", "#{prefix}/abc/foo.rb", "#{prefix}/inside_jar.rb", "#{prefix}/second_jar.rb"].each do |f|
assert $__glob_value2.include?(f)
end
assert_equal ["#{jar_file}/abc"], Dir["#{jar_file}/abc"]
@@ -167,7 +165,6 @@ def test_glob_with_magic_inside_jar_file
aref = Dir["#{jar_file}/[a-z]*_jar.rb"]
glob = Dir.glob("#{jar_file}/[a-z]*_jar.rb")

pend 'FIXME: regression after merge - (@mkristian) please review'
[aref, glob].each do |collect|
["#{jar_file}/inside_jar.rb", "#{jar_file}/second_jar.rb"].each do |f|
assert collect.include?(f)
@@ -210,7 +207,7 @@ def jar_file_with_spaces

first = File.expand_path(File.join(File.dirname(__FILE__), '..'))

"file:" + File.join(first, "test", "dir with spaces", "test_jar.jar") + "!"
"file:" + File.join(first, "jruby", "dir with spaces", "test_jar.jar") + "!"
end

# JRUBY-4177
5 changes: 3 additions & 2 deletions test/jruby/test_load.rb
Original file line number Diff line number Diff line change
@@ -192,8 +192,9 @@ def test_require_with_non_existent_jar_3
end

def test_load_rb_if_jar_doesnt_exist
pend 'someone (@mkristian?) please fix me'
require 'test/jruby/fake.jar' # test/fake.jar does not exist, but test/fake.jar.rb does.
# commit f5d1f9b99aa667c4449241b43dd4dcec258548cb removed this feature
# keep this for easier merging with jruby-1_7
#require 'test/jruby/fake.jar' # test/fake.jar does not exist, but test/fake.jar.rb does.
end

def test_overriding_require_shouldnt_cause_problems