summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2018-07-12 09:09:03 +0300
committerSergey Poznyakoff <gray@gnu.org>2018-07-12 09:09:03 +0300
commitedfeb103b85e10aa9e6825d3b92c5888fb4dea94 (patch)
treea464544110c01c65098a282c459e54afdb41c455 /t
parent77946164120de0a135035621762779bfa50e82d0 (diff)
downloadconfig-haproxy-edfeb103b85e10aa9e6825d3b92c5888fb4dea94.tar.gz
config-haproxy-edfeb103b85e10aa9e6825d3b92c5888fb4dea94.tar.bz2
Drop dependency on autodiev1.01
* Changes: Update * lib/Config/HAProxy.pm: Improve description of the write method. * t/format.t: Pass string ref to write. Don't use autodie. * t/select.t: Don't use autodie.
Diffstat (limited to 't')
-rw-r--r--t/format.t17
-rw-r--r--t/select.t1
2 files changed, 4 insertions, 14 deletions
diff --git a/t/format.t b/t/format.t
index 06b9884..2d124fc 100644
--- a/t/format.t
+++ b/t/format.t
@@ -3,7 +3,6 @@ use lib qw(t lib);
use strict;
use warnings;
use Test::More;
-use autodie;
BEGIN {
plan tests => 6;
@@ -14,9 +13,7 @@ my $hp = new Test::HAProxy;
isa_ok($hp,'Test::HAProxy');
my $s;
-open(my $fh, '>', \$s);
-$hp->write($fh);
-close $fh;
+$hp->write(\$s);
is($s, q{global
# comment
@@ -33,9 +30,7 @@ backend out
server localhost http://127.0.0.1
}, 'default write');
-open($fh, '>', \$s);
-$hp->write($fh, indent => 2);
-close $fh;
+$hp->write(\$s, indent => 2);
is($s, q{global
# comment
@@ -52,9 +47,7 @@ backend out
server localhost http://127.0.0.1
}, 'reindent');
-open($fh, '>', \$s);
-$hp->write($fh, indent => 2, reindent_comments => 1);
-close $fh;
+$hp->write(\$s, indent => 2, reindent_comments => 1);
is($s, q{global
# comment
@@ -71,9 +64,7 @@ backend out
server localhost http://127.0.0.1
}, 'reindent comments');
-open($fh, '>', \$s);
-$hp->write($fh, indent => 4, tabstop => [ 10, 24 ]);
-close $fh;
+$hp->write(\$s, indent => 4, tabstop => [ 10, 24 ]);
is($s, q{global
# comment
diff --git a/t/select.t b/t/select.t
index 0be1c9c..1930ff6 100644
--- a/t/select.t
+++ b/t/select.t
@@ -3,7 +3,6 @@ use lib qw(t lib);
use strict;
use warnings;
use Test::More;
-use autodie;
BEGIN {
plan tests => 4;

Return to:

Send suggestions and report system problems to the System administrator.