Browse files

tests: use LOG_NDELAY rather than LOG_PERROR for better portability.

Some platforms don't define the LOG_PERROR option, and Unix::Syslog doesn't
export it where it doesn't exist.  This fixes broken tests on
i86pc-solaris-64int 2.11, thanks CPAN Testers.
  • Loading branch information...
1 parent 3852d3d commit c0205afc69710e66868ef2a318bb30690f1734f5 @slippycheeze committed May 29, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 t/options.t
@@ -39,11 +39,11 @@ is $openlog[1], LOG_PID, "the default options were used";
is $openlog[2], LOG_LOCAL7, "the default facility was used";
# Custom options
-lives_ok { Log::Any::Adapter->set('Syslog', options => LOG_PERROR) }
+lives_ok { Log::Any::Adapter->set('Syslog', options => LOG_NDELAY) }
"No exception setting the adapter to syslog with options";
is $openlog[0], 'options.t', "the right syslog name was inferred";
-is $openlog[1], LOG_PERROR, "the custom options were used";
+is $openlog[1], LOG_NDELAY, "the custom options were used";
is $openlog[1] & LOG_PID, 0, "the default LOG_PID option was not merged";
is $openlog[2], LOG_LOCAL7, "the default LOG_LOCAL7 facility was used";

0 comments on commit c0205af

Please sign in to comment.