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

ruby-changes:35704

From: odaira <ko1@a...>
Date: Sat, 4 Oct 2014 16:35:49 +0900 (JST)
Subject: [ruby-changes:35704] odaira:r47786 (trunk): test/test_syslog.rb (TestSyslog#test_log): In AIX, each output line of LOG_PERROR to stderr has an additional empty line appended, so skip that line.

odaira	2014-10-04 16:35:43 +0900 (Sat, 04 Oct 2014)

  New Revision: 47786

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

  Log:
    test/test_syslog.rb (TestSyslog#test_log): In AIX, each output line of LOG_PERROR to stderr has an additional empty line appended, so skip that line.

  Modified files:
    trunk/ChangeLog
    trunk/test/test_syslog.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 47785)
+++ ChangeLog	(revision 47786)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Oct  4 16:24:41 2014  Rei Odaira  <Rei.Odaira@g...>
+
+	* test/test_syslog.rb (TestSyslog#test_log): In AIX, each output
+	  line of LOG_PERROR to stderr has an additional empty line appended,
+	  so skip that line.
+
 Sat Oct  4 16:05:49 2014  Rei Odaira  <Rei.Odaira@g...>
 
 	* test/socket/test_unix.rb (TestSocket_UNIXSocket#test_too_long_path):
Index: test/test_syslog.rb
===================================================================
--- test/test_syslog.rb	(revision 47785)
+++ test/test_syslog.rb	(revision 47786)
@@ -146,6 +146,10 @@ class TestSyslog < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_syslog.rb#L146
       2.times {
         re = syslog_line_regex("syslog_test", "test1 - hello, world!")
         line = stderr[0].gets
+        # In AIX, each LOG_PERROR output line has an appended empty line.
+        if /aix/ =~ RUBY_PLATFORM && line =~ /^$/
+          line = stderr[0].gets
+        end
         m = re.match(line)
         assert_not_nil(m)
         if m[1]
@@ -157,6 +161,10 @@ class TestSyslog < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_syslog.rb#L161
       2.times {
         re = syslog_line_regex("syslog_test", "test2 - pid")
         line = stderr[0].gets
+        # In AIX, each LOG_PERROR output line has an appended empty line.
+        if /aix/ =~ RUBY_PLATFORM && line =~ /^$/
+          line = stderr[0].gets
+        end
         m = re.match(line)
         assert_not_nil(m)
         assert_not_nil(m[1])

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

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