mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
dlntest.dll: move
* ext/-test-/win32/dln/{depend,extconf.rb} (dlntest.dll): make under the extension directory, instead of the top directory. * test/-ext-/win32/test_dln.rb (test_check_imported): explicit PATH environment variable to load the DLL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0e0bff1589
commit
958c04898c
3 changed files with 10 additions and 6 deletions
|
@ -1,8 +1,8 @@
|
||||||
$(TARGET_SO): $(DLNTESTLIB)
|
$(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)
|
$(ECHO) linking shared-object $(@F)
|
||||||
-$(Q)$(RM) $@
|
-$(Q)$(RM) $@
|
||||||
-$(Q)$(MAKEDIRS) $(@D)
|
-$(Q)$(MAKEDIRS) $(@D)
|
||||||
|
|
|
@ -4,7 +4,7 @@ if $mingw or $mswin
|
||||||
$LOCAL_LIBS << " #{dlntestlib}"
|
$LOCAL_LIBS << " #{dlntestlib}"
|
||||||
$srcs = ["dlntest.c"]
|
$srcs = ["dlntest.c"]
|
||||||
$objs = ["dlntest.o"]
|
$objs = ["dlntest.o"]
|
||||||
testdll = "$(topdir)/dlntest.dll"
|
testdll = "dlntest.dll"
|
||||||
$cleanfiles << testdll
|
$cleanfiles << testdll
|
||||||
$cleanfiles << "dlntest.#{$LIBEXT}"
|
$cleanfiles << "dlntest.#{$LIBEXT}"
|
||||||
config_string('cleanobjs') {|t| $cleanfiles.concat(t.gsub(/\$\*/, 'dlntest').split)}
|
config_string('cleanobjs') {|t| $cleanfiles.concat(t.gsub(/\$\*/, 'dlntest').split)}
|
||||||
|
@ -13,8 +13,8 @@ if $mingw or $mswin
|
||||||
m << "\n""DLNTESTLIB = #{dlntestlib}\n"
|
m << "\n""DLNTESTLIB = #{dlntestlib}\n"
|
||||||
if $mingw
|
if $mingw
|
||||||
m << "\n"
|
m << "\n"
|
||||||
m << "$(topdir)/dlntest.dll: DEFFILE := $(srcdir)/libdlntest.def\n"
|
m << "dlntest.dll: DEFFILE := $(srcdir)/libdlntest.def\n"
|
||||||
m << "$(topdir)/dlntest.dll: DLDFLAGS += -Wl,--out-implib,$(DLNTESTLIB)\n"
|
m << "dlntest.dll: DLDFLAGS += -Wl,--out-implib,$(DLNTESTLIB)\n"
|
||||||
end
|
end
|
||||||
m
|
m
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,7 +8,11 @@ module Bug
|
||||||
class TestDln < Test::Unit::TestCase
|
class TestDln < Test::Unit::TestCase
|
||||||
def test_check_imported
|
def test_check_imported
|
||||||
bug = '[Bug #6303]'
|
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
|
end
|
||||||
|
|
||||||
def test_nonascii_load
|
def test_nonascii_load
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue