summaryrefslogtreecommitdiff
path: root/test/test_syslog.rb
diff options
context:
space:
mode:
authorodaira <odaira@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-04 07:35:43 +0000
committerodaira <odaira@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-04 07:35:43 +0000
commit11ad7c4dbe323de89695ac6cf107d3094174e16f (patch)
tree23de7cd8ea8e4e7a46ddaf02ef84f86ff35169cb /test/test_syslog.rb
parentbebb4e9deab9723208cccaec5d3124324bbf80b8 (diff)
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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_syslog.rb')
-rw-r--r--test/test_syslog.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_syslog.rb b/test/test_syslog.rb
index 05d8598..3164d07 100644
--- a/test/test_syslog.rb
+++ b/test/test_syslog.rb
@@ -146,6 +146,10 @@ class TestSyslog < Test::Unit::TestCase
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
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])