summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/-test-/win32/dln/depend4
-rw-r--r--ext/-test-/win32/dln/extconf.rb6
-rw-r--r--test/-ext-/win32/test_dln.rb6
3 files changed, 10 insertions, 6 deletions
diff --git a/ext/-test-/win32/dln/depend b/ext/-test-/win32/dln/depend
index 712fefa29a4..c3f14db4f7a 100644
--- a/ext/-test-/win32/dln/depend
+++ b/ext/-test-/win32/dln/depend
@@ -1,8 +1,8 @@
$(TARGET_SO): $(DLNTESTLIB)
-$(DLNTESTLIB): $(topdir)/dlntest.dll
+$(DLNTESTLIB): dlntest.dll
-$(topdir)/dlntest.dll: libdlntest.o libdlntest.def
+dlntest.dll: libdlntest.o libdlntest.def
$(ECHO) linking shared-object $(@F)
-$(Q)$(RM) $@
-$(Q)$(MAKEDIRS) $(@D)
diff --git a/ext/-test-/win32/dln/extconf.rb b/ext/-test-/win32/dln/extconf.rb
index 55c2d16d1e9..d72b6a868cc 100644
--- a/ext/-test-/win32/dln/extconf.rb
+++ b/ext/-test-/win32/dln/extconf.rb
@@ -4,7 +4,7 @@ if $mingw or $mswin
$LOCAL_LIBS << " #{dlntestlib}"
$srcs = ["dlntest.c"]
$objs = ["dlntest.o"]
- testdll = "$(topdir)/dlntest.dll"
+ testdll = "dlntest.dll"
$cleanfiles << testdll
$cleanfiles << "dlntest.#{$LIBEXT}"
config_string('cleanobjs') {|t| $cleanfiles.concat(t.gsub(/\$\*/, 'dlntest').split)}
@@ -13,8 +13,8 @@ if $mingw or $mswin
m << "\n""DLNTESTLIB = #{dlntestlib}\n"
if $mingw
m << "\n"
- m << "$(topdir)/dlntest.dll: DEFFILE := $(srcdir)/libdlntest.def\n"
- m << "$(topdir)/dlntest.dll: DLDFLAGS += -Wl,--out-implib,$(DLNTESTLIB)\n"
+ m << "dlntest.dll: DEFFILE := $(srcdir)/libdlntest.def\n"
+ m << "dlntest.dll: DLDFLAGS += -Wl,--out-implib,$(DLNTESTLIB)\n"
end
m
end
diff --git a/test/-ext-/win32/test_dln.rb b/test/-ext-/win32/test_dln.rb
index fd5e453719e..a6eedce1641 100644
--- a/test/-ext-/win32/test_dln.rb
+++ b/test/-ext-/win32/test_dln.rb
@@ -8,7 +8,11 @@ module Bug
class TestDln < Test::Unit::TestCase
def test_check_imported
bug = '[Bug #6303]'
- assert_in_out_err(['-r-test-/win32/dln', '-eexit'], '', [], [], bug, timeout: 10)
+ so = File.expand_path("../ext/-test-/win32/dln/dlntest.dll", EnvUtil.rubybin)
+ assert_send([File, :file?, so])
+ path = ENV['PATH']
+ path = File.dirname(so) + RbConfig::CONFIG["PATH_SEPARATOR"] + path
+ assert_in_out_err([{'PATH'=>path}, '-r-test-/win32/dln', '-eexit'], '', [], [], bug, timeout: 10)
end
def test_nonascii_load