mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/win32ole/test_err_in_callback.rb: remove temporary files.
some refactoring. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
142a7a03e1
commit
9b47469a25
2 changed files with 17 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Sat Aug 2 22:55:41 2008 Masaki Suketa <masaki.suketa@nifty.ne.jp>
|
||||||
|
|
||||||
|
* test/win32ole/test_err_in_callback.rb: remove temporary files.
|
||||||
|
some refactoring.
|
||||||
|
|
||||||
Sat Aug 2 15:51:50 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sat Aug 2 15:51:50 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* parse.y (yylex): 8 and 9 in octal integer should cause compile
|
* parse.y (yylex): 8 and 9 in octal integer should cause compile
|
||||||
|
|
|
@ -15,7 +15,8 @@ if defined?(WIN32OLE)
|
||||||
def setup
|
def setup
|
||||||
@ruby = nil
|
@ruby = nil
|
||||||
if File.exist?("./" + CONFIG["RUBY_INSTALL_NAME"] + CONFIG["EXEEXT"])
|
if File.exist?("./" + CONFIG["RUBY_INSTALL_NAME"] + CONFIG["EXEEXT"])
|
||||||
@ruby = "./" + CONFIG["RUBY_INSTALL_NAME"]
|
sep = File::ALT_SEPARATOR || "/"
|
||||||
|
@ruby = "." + sep + CONFIG["RUBY_INSTALL_NAME"]
|
||||||
@iopt = $:.map {|e|
|
@iopt = $:.map {|e|
|
||||||
" -I " + e
|
" -I " + e
|
||||||
}.join("")
|
}.join("")
|
||||||
|
@ -33,14 +34,20 @@ if defined?(WIN32OLE)
|
||||||
f = cfolder.CreateTextFile(dummy_file)
|
f = cfolder.CreateTextFile(dummy_file)
|
||||||
f.writeLine("<html><body><div id='str'>#{@str}</div></body></html>")
|
f.writeLine("<html><body><div id='str'>#{@str}</div></body></html>")
|
||||||
f.close
|
f.close
|
||||||
|
@f = dummy_file
|
||||||
dummy_path = cfolder.path + "\\" + dummy_file
|
dummy_path = cfolder.path + "\\" + dummy_file
|
||||||
dummy_path
|
dummy_path
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_err_in_callback
|
def test_err_in_callback
|
||||||
if @ruby
|
if @ruby
|
||||||
r = `#{@ruby} #{@iopt} #{@script} #{@param}`
|
cmd = "#{@ruby} -v #{@iopt} #{@script} #{@param} > test_err_in_callback.log 2>&1"
|
||||||
assert_match(/NameError/, r)
|
system(cmd)
|
||||||
|
str = ""
|
||||||
|
open("test_err_in_callback.log") {|ifs|
|
||||||
|
str = ifs.read
|
||||||
|
}
|
||||||
|
assert_match(/NameError/, str)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -68,6 +75,8 @@ if defined?(WIN32OLE)
|
||||||
def teardown
|
def teardown
|
||||||
WIN32OLE_EVENT.message_loop
|
WIN32OLE_EVENT.message_loop
|
||||||
ie_quit
|
ie_quit
|
||||||
|
File.unlink(@f)
|
||||||
|
File.unlink("test_err_in_callback.log")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue