Граф коммитов

16 Коммитов

Автор SHA1 Сообщение Дата
Yusuke Endoh c6633f21a4 Update some syslog tests to absurb the format change of FreeBSD syslog
FreeBSD

```
$ ruby -rsyslog -e 'Syslog.open("rubyspec", Syslog::LOG_PERROR) {|s| s.log(Syslog::LOG_ALERT, "Hello") }'
rubyspec 78462 - - Hello
```

Linux

```
$ ruby -rsyslog -e 'Syslog.open("rubyspec", Syslog::LOG_PERROR) {|s| s.log(Syslog::LOG_ALERT, "Hello") }'
rubyspec: Hello
```

591ef7c807
2020-03-12 15:30:20 +09:00
Yusuke Endoh f3c4e620ac test/test_syslog.rb (test_log): skipped on Android
On Android 28, LOG_PERROR is defined, but not implemented yet.
This change skips Syslog#log explicitly.
2019-10-11 21:13:52 +09:00
naruse 3e92b635fb Add frozen_string_literal: false for all files
When you change this to true, you may need to add more tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16 05:07:31 +00:00
nobu ae042f21fb use assert_raise
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-02 02:18:44 +00:00
odaira 11ad7c4dbe 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
2014-10-04 07:35:43 +00:00
hsbt aae667d242 * test/test_syslog.rb: remove executable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-31 07:03:13 +00:00
akr ce0c2b2170 test/test_syslog.rb: Close fds.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-29 14:59:24 +00:00
hsbt 829d9fdce6 * test/test_syslog.rb: adjust indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-27 12:52:16 +00:00
knu 39eea54cfe * test/test_syslog.rb (TestSyslog#test_log): Do not be too
specific about the log line format.  Fixes #5081.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-05 08:26:42 +00:00
shyouhei bb41909d8b Skip syslog tests that rely on LOG_PERROR unless it's defined
Instead of checking looking at the platform to determine if the tests
relying on LOG_PERROR should be run, look for the definition of the
constant as this will be robust against all platforms as long as the
underlying syslog.c code sets it up correctly.

This specifically addresses failures on Solaris 9.

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: URABE, Shyouhei <shyouhei@ruby-lang.org>



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-25 11:06:57 +00:00
shyouhei d711cde778 Use LOG_PID instead of LOG_PERROR in Syslog.open test
LOG_PERROR isn't a POSIX option for syslog, so it fails on platforms
that don't define it.  Solaris 9 and 10 are examples of this.

Use LOG_PID instead.

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: URABE, Shyouhei <shyouhei@ruby-lang.org>



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-25 11:06:56 +00:00
kosaki fe505c47c8 * test/test_syslog.rb: Fix to make a lot of test failure if
the platform doesn't support syslog.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-22 15:46:11 +00:00
naruse 6bbed0e31b * test: use require_relative.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-12 17:00:51 +00:00
kazu a8aa5c44fc * test/test_syslog.rb (TestSyslog#test_open): check
param after block again. because detect not to call block.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-18 08:01:48 +00:00
kazu 950bd573f6 * test/test_syslog.rb (TestSyslog#test_open): check
block parameter in block. [ruby-dev:38180]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-18 07:40:26 +00:00
nobu 0aeb2336ba * test/test_syslog.rb: moved.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06 04:04:56 +00:00