From 509c7f44a8a42adafedf09d0e13478be713c1d4d Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 20 Mar 2024 11:10:39 +0000 Subject: [PATCH] Bug 36357: Tidy xgettext-tt2.t Signed-off-by: Kyle M Hall --- t/db_dependent/misc/translator/xgettext-tt2.t | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/t/db_dependent/misc/translator/xgettext-tt2.t b/t/db_dependent/misc/translator/xgettext-tt2.t index 3f8e4b0069d..d9493051f4d 100755 --- a/t/db_dependent/misc/translator/xgettext-tt2.t +++ b/t/db_dependent/misc/translator/xgettext-tt2.t @@ -4,16 +4,16 @@ use Modern::Perl; use File::Slurp; use File::Temp qw(tempdir); -use FindBin qw($Bin); +use FindBin qw($Bin); use Locale::PO; use Test::More tests => 43; -my $tempdir = tempdir(CLEANUP => 1); +my $tempdir = tempdir( CLEANUP => 1 ); -write_file("$tempdir/files", "$Bin/sample.tt"); +write_file( "$tempdir/files", "$Bin/sample.tt" ); -my $xgettext_cmd = "$Bin/../../../../misc/translator/xgettext-tt2 --from-code=UTF-8 " - . "-o $tempdir/Koha.pot -f $tempdir/files"; +my $xgettext_cmd = + "$Bin/../../../../misc/translator/xgettext-tt2 --from-code=UTF-8 " . "-o $tempdir/Koha.pot -f $tempdir/files"; system($xgettext_cmd); my $pot = Locale::PO->load_file_asarray("$tempdir/Koha.pot"); @@ -26,30 +26,30 @@ my @expected = ( msgid => '"hello {name}"', }, { - msgid => '"item"', + msgid => '"item"', msgid_plural => '"items"', }, { - msgid => '"{count} item"', + msgid => '"{count} item"', msgid_plural => '"{count} items"', }, { - msgid => '"hello"', + msgid => '"hello"', msgctxt => '"context"', }, { - msgid => '"hello {name}"', + msgid => '"hello {name}"', msgctxt => '"context"', }, { - msgid => '"item"', + msgid => '"item"', msgid_plural => '"items"', - msgctxt => '"context"', + msgctxt => '"context"', }, { - msgid => '"{count} item"', + msgid => '"{count} item"', msgid_plural => '"{count} items"', - msgctxt => '"context"', + msgctxt => '"context"', }, { msgid => '"status is {status}"', @@ -67,17 +67,17 @@ my @expected = ( msgid => '"with filter"', }, { - msgid => '"filter singular"', + msgid => '"filter singular"', msgid_plural => '"filter plural"', }, ); -for (my $i = 0; $i < @expected; $i++) { +for ( my $i = 0 ; $i < @expected ; $i++ ) { for my $key (qw(msgid msgid_plural msgctxt)) { - my $expected = $expected[$i]->{$key}; + my $expected = $expected[$i]->{$key}; my $expected_str = defined $expected ? $expected : 'not defined'; - is($pot->[$i + 1]->$key, $expected, "$i: $key is $expected_str"); + is( $pot->[ $i + 1 ]->$key, $expected, "$i: $key is $expected_str" ); } } -is(@$pot, 1 + @expected, "No more strings than expected"); +is( @$pot, 1 + @expected, "No more strings than expected" ); -- 2.30.2