Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added failing test cases for autoflush handling

  • Loading branch information...
commit 7b974df1e2f02c33811ecb5961f73de75191099d 1 parent 43870be
@sdt authored
Showing with 14 additions and 1 deletion.
  1. +14 −1 t/2-with-log-any.t
View
15 t/2-with-log-any.t
@@ -3,7 +3,7 @@ use Test::More;
use IO::File;
use IO::String;
-plan tests => 3;
+plan tests => 5;
{
my $str = IO::String->new();
@@ -31,3 +31,16 @@ plan tests => 3;
$fh->close();
}
+{
+ my $fh = IO::File->new_tmpfile();
+ Log::Any->set_adapter('FileHandle', fh=>$fh);
+
+ ok($fh->autoflush, "Testing autoflush is turned on");
+}
+
+{
+ my $fh = IO::File->new_tmpfile();
+ Log::Any->set_adapter('FileHandle', fh=>$fh, no_autoflush=>1);
+
+ ok(! $fh->autoflush, "Testing autoflush is turned off");
+}
Please sign in to comment.
Something went wrong with that request. Please try again.