1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/syslog/test.rb: Switch from RUnit to Test::Unit.

* ext/syslog/test.rb: The output format of inspect() is slightly
  altered.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
knu 2002-11-27 07:14:00 +00:00
parent 31a57b49db
commit 2c463325ae
2 changed files with 18 additions and 17 deletions

View file

@ -1,3 +1,10 @@
Wed Nov 27 16:11:53 2002 Akinori MUSHA <knu@iDaemons.org>
* ext/syslog/test.rb: Switch from RUnit to Test::Unit.
* ext/syslog/test.rb: The output format of inspect() is slightly
altered.
Wed Nov 27 06:43:26 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* error.c (exit_initialize): add SystemExit#initialize to set

View file

@ -5,17 +5,16 @@
# Please only run this test on machines reasonable for testing.
# If in doubt, ask your admin.
require 'runit/testcase'
require 'runit/cui/testrunner'
require 'test/unit'
# Prepend current directory to load path for testing.
$:.unshift('.')
require 'syslog'
class TestSyslog < RUNIT::TestCase
class TestSyslog < Test::Unit::TestCase
def test_new
assert_exception(NameError) {
assert_raises(NoMethodError) {
Syslog.new
}
end
@ -41,7 +40,7 @@ class TestSyslog < RUNIT::TestCase
assert_equal(Syslog::LOG_USER, Syslog.facility)
# open without close
assert_exception(RuntimeError) {
assert_raises(RuntimeError) {
Syslog.open
}
@ -143,19 +142,14 @@ class TestSyslog < RUNIT::TestCase
def test_inspect
Syslog.open { |sl|
assert_equal(format('<#%s: opened=%s, ident="%s", ' +
'options=%d, facility=%d, mask=%d>',
Syslog, sl.opened?, sl.ident,
sl.options, sl.facility, sl.mask),
assert_equal(format('<#%s: ident="%s", options=%d, facility=%d, mask=%d%s>',
Syslog,
sl.ident,
sl.options,
sl.facility,
sl.mask,
sl.opened? ? ', opened' : ''),
sl.inspect)
}
end
end
if $0 == __FILE__
suite = RUNIT::TestSuite.new
suite.add_test(TestSyslog.suite)
RUNIT::CUI::TestRunner.run(suite)
end