[前][次][番号順一覧][スレッド一覧]

ruby-changes:18608

From: kosaki <ko1@a...>
Date: Sun, 23 Jan 2011 00:46:20 +0900 (JST)
Subject: [ruby-changes:18608] Ruby:r30632 (trunk): * test/test_syslog.rb: Fix to make a lot of test failure if

kosaki	2011-01-23 00:46:11 +0900 (Sun, 23 Jan 2011)

  New Revision: 30632

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30632

  Log:
    * test/test_syslog.rb: Fix to make a lot of test failure if
      the platform doesn't support syslog.

  Modified files:
    trunk/ChangeLog
    trunk/test/test_syslog.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 30631)
+++ ChangeLog	(revision 30632)
@@ -1,3 +1,8 @@
+Sun Jan 23 00:40:10 2011  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* test/test_syslog.rb: Fix to make a lot of test failure if
+	  the platform doesn't support syslog.
+
 Sat Jan 22 11:49:55 2011  Aaron Patterson <aaron@t...>
 
 	* ext/psych/lib/psych/visitors/to_ruby.rb: fixing merge key support
Index: test/test_syslog.rb
===================================================================
--- test/test_syslog.rb	(revision 30631)
+++ test/test_syslog.rb	(revision 30632)
@@ -6,8 +6,13 @@
 # If in doubt, ask your admin.
 
 require 'test/unit'
-require 'syslog'
 
+begin
+  require 'syslog'
+rescue LoadError
+  # suppress error messages.
+end
+
 class TestSyslog < Test::Unit::TestCase
   def test_new
     assert_raises(NoMethodError) {
@@ -159,4 +164,4 @@
 
     assert_equal(format('<#%s: opened=false>', Syslog), Syslog.inspect)
   end
-end
+end if defined?(Syslog)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]