"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "t/snippets18.t" between
Perl-Tidy-20210402.tar.gz and Perl-Tidy-20210717.tar.gz

About: Perltidy is a Perl script indenter and reformatter (beautifier).

snippets18.t  (Perl-Tidy-20210402):snippets18.t  (Perl-Tidy-20210717)
skipping to change at line 122 skipping to change at line 122
die; die;
} }
catch { catch {
die; die;
}; };
---------- ----------
'comments' => <<'----------', 'comments' => <<'----------',
#!/usr/bin/perl -w #!/usr/bin/perl -w
# an initial hash bang line cannot be deleted with -dp # an initial hash bang line cannot be deleted with -dp
#<<< format skipping of first code can cause an error message in perltidy v20210
625
my $rvar = [ [ 1, 2, 3 ], [ 4, 5, 6 ] ];
#>>>
sub length { return length($_[0]) } # side comment sub length { return length($_[0]) } # side comment
# hanging side comment # hanging side comment
# very longgggggggggggggggggggggggggggggggggggggggg gggggggggggg hanging side comment # very longgggggggggggggggggggggggggggggggggggggggg gggggggggggg hanging side comment
# a blank will be inserted to prevent forming a hanging side comment # a blank will be inserted to prevent forming a hanging side comment
sub macro_get_names { # sub macro_get_names { #
# #
# %name = macro_get_names(); (key=macrohandle, value=macroname) # %name = macro_get_names(); (key=macrohandle, value=macroname)
# #
##local(%name); # a static block comment without indentation ##local(%name); # a static block comment without indentation
skipping to change at line 282 skipping to change at line 285
# BEGIN SECTION 3: Expected output # # BEGIN SECTION 3: Expected output #
#################################### ####################################
$rtests = { $rtests = {
'wn7.wn' => { 'wn7.wn' => {
source => "wn7", source => "wn7",
params => "wn", params => "wn",
expect => <<'#1...........', expect => <<'#1...........',
# do not weld paren to opening one-line non-paren container # do not weld paren to opening one-line non-paren container
$Self->_Add( $Self->_Add(
$SortOrderDisplay{ $Field->GenerateFieldForSelectSQL() } $SortOrderDisplay{
$Field->GenerateFieldForSelectSQL()
}
); );
# this will not get welded with -wn # this will not get welded with -wn
f( f(
do { 1; !!( my $x = bless [] ); } do { 1; !!( my $x = bless [] ); }
); );
#1........... #1...........
}, },
'wn8.def' => { 'wn8.def' => {
skipping to change at line 330 skipping to change at line 335
'wn8.wn' => { 'wn8.wn' => {
source => "wn8", source => "wn8",
params => "wn", params => "wn",
expect => <<'#3...........', expect => <<'#3...........',
# Former -wn blinkers, which oscillated between two states # Former -wn blinkers, which oscillated between two states
# fixed RULE 1 only applies to '(' # fixed RULE 1 only applies to '('
my $res = eval { { $die_on_fetch, 0 } }; my $res = eval { { $die_on_fetch, 0 } };
my $res = eval { { $die_on_fetch, 0 } }; my $res = eval {
{ $die_on_fetch, 0 }
};
# fixed RULE 2 applies to any inner opening token; this is a stable # fixed RULE 2 applies to any inner opening token; this is a stable
# state with -wn # state with -wn
$app->FORM->{'appbar1'}->set_status( $app->FORM->{'appbar1'}->set_status(
_("Cannot delete zone $name: sub-zones or appellations exist.") _("Cannot delete zone $name: sub-zones or appellations exist.")
); );
# OLD: fixed RULE 1: this is now a stable state with -wn # OLD: fixed RULE 1: this is now a stable state with -wn
# NEW (30 jan 2021): do not weld if one interior token # NEW (30 jan 2021): do not weld if one interior token
$app->FORM->{'appbar1'}->set_status( $app->FORM->{'appbar1'}->set_status(
skipping to change at line 352 skipping to change at line 359
); );
#3........... #3...........
}, },
'comments.comments5' => { 'comments.comments5' => {
source => "comments", source => "comments",
params => "comments5", params => "comments5",
expect => <<'#4...........', expect => <<'#4...........',
#!/usr/bin/perl -w #!/usr/bin/perl -w
# an initial hash bang line cannot be deleted with -dp # an initial hash bang line cannot be deleted with -dp
#<<< format skipping of first code can cause an error message in perltidy v20210
625
my $rvar = [ [ 1, 2, 3 ], [ 4, 5, 6 ] ];
#>>>
sub length { return length( $_[0] ) } sub length { return length( $_[0] ) }
# a blank will be inserted to prevent forming a hanging side comment # a blank will be inserted to prevent forming a hanging side comment
sub macro_get_names { sub macro_get_names {
# #
# %name = macro_get_names(); (key=macrohandle, value=macroname) # %name = macro_get_names(); (key=macrohandle, value=macroname)
# #
##local(%name); # a static block comment without indentation ##local(%name); # a static block comment without indentation
local (%name) = (); local (%name) = ();
 End of changes. 4 change blocks. 
2 lines changed or deleted 14 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)