Skip to content

Commit

Permalink
Remove unneeded perltidy markers
Browse files Browse the repository at this point in the history
With the new perltidy, several #<<< and #>>> pairs can be removed.
  • Loading branch information
rra committed Mar 17, 2024
1 parent fcb38c6 commit b7e9e42
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 18 deletions.
12 changes: 3 additions & 9 deletions t/data/regenerate-data
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,20 @@ use Pod::Text::Overstrike;
use Pod::Text::Termcap;

# Hard-code configuration for Term::Cap to get predictable results.
#<<<
local $ENV{COLUMNS} = 80;
local $ENV{TERM} = 'xterm';
local $ENV{COLUMNS} = 80;
local $ENV{TERM} = 'xterm';
local $ENV{TERMPATH} = File::Spec->catfile('t', 'data', 'termcap');
local $ENV{TERMCAP} = 'xterm:co=#80:do=^J:md=\\E[1m:us=\\E[4m:me=\\E[m';
#>>>
local $ENV{TERMCAP} = 'xterm:co=#80:do=^J:md=\\E[1m:us=\\E[4m:me=\\E[m';

# Map of translators to the file containing the formatted output for the
# general/basic.t test.
#<<<
my %output = (
'Pod::Man' => File::Spec->catfile('t', 'data', 'basic.man'),
'Pod::Text' => File::Spec->catfile('t', 'data', 'basic.txt'),
'Pod::Text::Color' => File::Spec->catfile('t', 'data', 'basic.clr'),
'Pod::Text::Overstrike' => File::Spec->catfile('t', 'data', 'basic.ovr'),
'Pod::Text::Termcap' => File::Spec->catfile('t', 'data', 'basic.cap'),
);
#>>>

# Regenerate those output files.
my $input = File::Spec->catfile('t', 'data', 'basic.pod');
Expand Down Expand Up @@ -74,13 +70,11 @@ for my $module (keys(%output)) {

# Now switch to the files for the man/encoding.t test.
$input = File::Spec->catfile('t', 'data', 'man', 'encoding.pod');
#<<<
%output = (
groff => File::Spec->catfile('t', 'data', 'man', 'encoding.groff'),
roff => File::Spec->catfile('t', 'data', 'man', 'encoding.roff'),
utf8 => File::Spec->catfile('t', 'data', 'man', 'encoding.utf8'),
);
#>>>

# For each encoding, load the input, generate the output, and check that the
# output matches.
Expand Down
10 changes: 3 additions & 7 deletions t/general/basic.t
Original file line number Diff line number Diff line change
Expand Up @@ -45,27 +45,23 @@ delete $ENV{NO_COLOR};
local $| = 1;

# Hard-code configuration for Term::Cap to get predictable results.
#<<<
local $ENV{COLUMNS} = 80;
local $ENV{TERM} = 'xterm';
local $ENV{COLUMNS} = 80;
local $ENV{TERM} = 'xterm';
local $ENV{TERMPATH} = File::Spec->catfile('t', 'data', 'termcap');
local $ENV{TERMCAP} = 'xterm:co=#80:do=^J:md=\\E[1m:us=\\E[4m:me=\\E[m';
#>>>
local $ENV{TERMCAP} = 'xterm:co=#80:do=^J:md=\\E[1m:us=\\E[4m:me=\\E[m';

# Find the source of the test file.
my $input = File::Spec->catfile('t', 'data', 'basic.pod');

# Map of translators to the file containing the formatted output to compare
# against.
#<<<
my %output = (
'Pod::Man' => File::Spec->catfile('t', 'data', 'basic.man'),
'Pod::Text' => File::Spec->catfile('t', 'data', 'basic.txt'),
'Pod::Text::Color' => File::Spec->catfile('t', 'data', 'basic.clr'),
'Pod::Text::Overstrike' => File::Spec->catfile('t', 'data', 'basic.ovr'),
'Pod::Text::Termcap' => File::Spec->catfile('t', 'data', 'basic.cap'),
);
#>>>

# Walk through teach of the modules and format the sample file, checking to
# ensure the results match the pre-generated file.
Expand Down
2 changes: 0 additions & 2 deletions t/man/encoding.t
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,11 @@ local $ENV{SOURCE_DATE_EPOCH} = 1664146047;

# Get the path to the input and output files.
my $input = File::Spec->catfile('t', 'data', 'man', 'encoding.pod');
#<<<
my %output = (
groff => File::Spec->catfile('t', 'data', 'man', 'encoding.groff'),
roff => File::Spec->catfile('t', 'data', 'man', 'encoding.roff'),
utf8 => File::Spec->catfile('t', 'data', 'man', 'encoding.utf8'),
);
#>>>

# For each encoding, load the input, generate the output, and check that the
# output matches.
Expand Down

0 comments on commit b7e9e42

Please sign in to comment.