Updated to Mojolicious 7.20
Change-Id: I3a194d4a4bc912950619a77e7a743c3f930eb544
diff --git a/t/batch_file.t b/t/batch_file.t
index ccfa62f..ed32401 100644
--- a/t/batch_file.t
+++ b/t/batch_file.t
@@ -5,7 +5,7 @@
use File::Basename 'dirname';
use File::Spec::Functions 'catdir';
use File::Temp qw/ :POSIX /;
-use Mojo::Util qw/slurp/;
+use Mojo::File;
use Mojo::JSON qw/decode_json/;
use IO::Uncompress::Gunzip;
use Data::Dumper;
@@ -25,7 +25,7 @@
ok(-f $output, 'File exists');
-ok(my $file = slurp $output, 'Slurp data');
+ok(my $file = Mojo::File->new($output)->slurp, 'Slurp data');
ok(my $json = decode_json $file, 'decode json');
@@ -66,7 +66,7 @@
];
$output = tmpnam();
ok($bf->process($path => $output), 'Process file');
-ok($file = slurp $output, 'Slurp data');
+ok($file = Mojo::File->new($output)->slurp, 'Slurp data');
ok($json = decode_json $file, 'decode json');
is($json->{textType}, 'Zeitung: Tageszeitung', 'text type');
@@ -99,7 +99,7 @@
ok($bf->process($path => $output), 'Process file');
ok(-f $output, 'File exists');
-ok($file = slurp $output, 'Slurp data');
+ok($file = Mojo::File->new($output)->slurp, 'Slurp data');
ok($json = decode_json $file, 'decode json');
ok(!$json->{data}->{text}, 'No Primary text');
@@ -111,7 +111,7 @@
$bf->{pretty} = 1;
ok($bf->process($path => $output), 'Process file');
ok(-f $output, 'File exists');
-ok($file = slurp $output, 'Slurp data');
+ok($file = Mojo::File->new($output)->slurp, 'Slurp data');
like($file, qr/^\{[\n\s]+"/, 'No pretty printing');
# Check overwriting