Updated to Mojolicious 7.20
Change-Id: I3a194d4a4bc912950619a77e7a743c3f930eb544
diff --git a/t/script/archive.t b/t/script/archive.t
index a0b4dd6..be959a2 100644
--- a/t/script/archive.t
+++ b/t/script/archive.t
@@ -4,7 +4,7 @@
use File::Basename 'dirname';
use File::Spec::Functions qw/catdir catfile/;
use File::Temp qw/tempdir/;
-use Mojo::Util qw/slurp/;
+use Mojo::File;
use Mojo::JSON qw/decode_json/;
use IO::Uncompress::Gunzip;
use Test::More;
@@ -66,7 +66,7 @@
};
ok(-f $json, 'Json file exists');
-ok((my $file = slurp $json), 'Slurp data');
+ok((my $file = Mojo::File->new($json)->slurp), 'Slurp data');
ok(($json = decode_json $file), 'decode json');
is($json->{data}->{tokenSource}, 'base#tokens_aggr', 'Title');
@@ -111,7 +111,7 @@
my $json_2 = catfile($output, 'corpus-doc-0002.json');
ok(-f $json_2, 'Json file exists 2');
- ok(($file = slurp $json_1), 'Slurp data');
+ ok(($file = Mojo::File->new($json_1)->slurp), 'Slurp data');
ok(($json_1 = decode_json $file), 'decode json');
is($json_1->{data}->{tokenSource}, 'tree_tagger#tokens', 'TokenSource');
@@ -119,7 +119,7 @@
is($json_1->{textSigle}, 'Corpus/Doc/0001', 'Sigle');
ok(-f $json_2, 'Json file exists');
- ok(($file = slurp $json_2), 'Slurp data');
+ ok(($file = Mojo::File->new($json_2)->slurp), 'Slurp data');
ok(($json_2 = decode_json $file), 'decode json');
is($json_2->{data}->{tokenSource}, 'tree_tagger#tokens', 'TokenSource');
diff --git a/t/script/base.t b/t/script/base.t
index bd2d8e5..252404b 100644
--- a/t/script/base.t
+++ b/t/script/base.t
@@ -4,7 +4,7 @@
use File::Basename 'dirname';
use File::Spec::Functions qw/catdir catfile/;
use File::Temp qw/ :POSIX /;
-use Mojo::Util qw/slurp/;
+use Mojo::File;
use Mojo::JSON qw/decode_json/;
use IO::Uncompress::Gunzip;
use Test::More;
@@ -43,7 +43,7 @@
);
ok(-f $output, 'Output does exist');
-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');
is($json->{textType}, 'Autobiographie', 'text type');
is($json->{title}, 'Autobiographische Einzelheiten', 'Title');
diff --git a/t/script/single.t b/t/script/single.t
index 40b7940..486e1b6 100644
--- a/t/script/single.t
+++ b/t/script/single.t
@@ -4,7 +4,7 @@
use File::Basename 'dirname';
use File::Spec::Functions qw/catdir catfile/;
use File::Temp qw/ :POSIX /;
-use Mojo::Util qw/slurp/;
+use Mojo::File;
use Mojo::JSON qw/decode_json/;
use IO::Uncompress::Gunzip;
use Test::More;
@@ -41,7 +41,7 @@
);
ok(-f $output, 'Output does exist');
-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');
is($json->{textType}, 'Zeitung: Tageszeitung', 'text type');
is($json->{title}, 'Beispiel Text', 'Title');
@@ -110,7 +110,7 @@
);
ok(-f $output, 'Output does exist');
-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');
@@ -184,7 +184,7 @@
);
ok(-f $output, 'Output does exist');
-ok(($file = slurp $output), 'Slurp data');
+ok(($file = Mojo::File->new($output)->slurp), 'Slurp data');
ok(($json = decode_json $file), 'decode json');
is($json->{data}->{text}, 'Selbst ist der Jeck', 'Text');