1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-02-11 09:51:56 +02:00

maint: tests: remove duplicate uses of 'my' in Perl

* tests/env/env-S.pl (cf): Remove uses of 'my' after the variable has
been declared.
* tests/factor/factor.pl (t): Likewise.
* tests/misc/fold.pl (prog): Remove duplicate assignment.
This commit is contained in:
Collin Funk
2025-01-19 21:15:35 -08:00
committed by Pádraig Brady
parent dcc896e6c3
commit 91d5a51236
3 changed files with 4 additions and 5 deletions

6
tests/env/env-S.pl vendored
View File

@@ -35,12 +35,12 @@ $env = $1;
my $cf = '__CF_USER_TEXT_ENCODING';
exists $ENV{$cf} and $env .= " -u$cf";
# Likewise for these Cygwin env vars
my $cf = 'SYSTEMROOT';
$cf = 'SYSTEMROOT';
exists $ENV{$cf} and $env .= " -u$cf";
my $cf = 'WINDIR';
$cf = 'WINDIR';
exists $ENV{$cf} and $env .= " -u$cf";
# Likewise for these GNU/Hurd env vars
my $cf = 'LD_ORIGIN_PATH';
$cf = 'LD_ORIGIN_PATH';
exists $ENV{$cf} and $env .= " -u$cf";
my @Tests =

View File

@@ -102,7 +102,7 @@ Test:
foreach $t (@Tests)
{
(my $arg1 = $t->[1]) =~ s| *\+?||; # strip '+'
(my $arg1 = $arg1) =~ s| *-[^ ]+ *||; # strip option
($arg1 = $arg1) =~ s| *-[^ ]+ *||; # strip option
# Don't fiddle with expected OUT string if there's a nonzero exit status.
foreach my $e (@$t)

View File

@@ -47,6 +47,5 @@ my @Tests =
my $save_temps = $ENV{DEBUG};
my $verbose = $ENV{VERBOSE};
my $prog = 'fold';
my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose);
exit $fail;