From bf38edc53089570ce86b4cbd468e2efc18436f01 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Wed, 2 Dec 2020 10:00:33 -0800 Subject: [PATCH] update VERSION to 20201202 --- CHANGES.md | 17 +++++------ MANIFEST | 1 + bin/perltidy | 2 +- docs/BugLog.html | 28 ++++++++++++++---- docs/ChangeLog.html | 19 +++++++------ docs/Tidy.html | 2 +- docs/perltidy.html | 4 +-- lib/Perl/Tidy.pm | 33 ++++++++++++++-------- lib/Perl/Tidy.pod | 2 +- lib/Perl/Tidy/Debugger.pm | 2 +- lib/Perl/Tidy/DevNull.pm | 2 +- lib/Perl/Tidy/Diagnostics.pm | 2 +- lib/Perl/Tidy/FileWriter.pm | 2 +- lib/Perl/Tidy/Formatter.pm | 2 +- lib/Perl/Tidy/HtmlWriter.pm | 2 +- lib/Perl/Tidy/IOScalar.pm | 2 +- lib/Perl/Tidy/IOScalarArray.pm | 2 +- lib/Perl/Tidy/IndentationItem.pm | 2 +- lib/Perl/Tidy/LineBuffer.pm | 2 +- lib/Perl/Tidy/LineSink.pm | 2 +- lib/Perl/Tidy/LineSource.pm | 2 +- lib/Perl/Tidy/Logger.pm | 2 +- lib/Perl/Tidy/Tokenizer.pm | 6 ++-- lib/Perl/Tidy/VerticalAligner.pm | 2 +- lib/Perl/Tidy/VerticalAligner/Alignment.pm | 2 +- lib/Perl/Tidy/VerticalAligner/Line.pm | 2 +- local-docs/BugLog.pod | 14 ++++----- t/snippets/perltidy_common_flags.pl | 22 +++++++++++++++ t/snippets/perltidy_random_run.pl | 5 +--- t/snippets/perltidy_random_setup.pl | 2 +- 30 files changed, 120 insertions(+), 69 deletions(-) create mode 100755 t/snippets/perltidy_common_flags.pl diff --git a/CHANGES.md b/CHANGES.md index ade00efb..26f382a6 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,16 +1,20 @@ # Perltidy Change Log -## 2020 10 01.03 +## 2020 12 02 + + - This release is being made primarily to make available a several new formatting + parameters, in particular -xci, -kbb=s, -kba=s, and -wnxl=s. No significant + bugs have been found since the previous release, but numerous minor issues have + been found and fixed as listed below. + + - This version is about 20% faster than the previous version due to optimizations + made with the help of Devel::NYTProf. - Added flag -wnxl=s, --weld-nested-exclusion-list=s, to provide control which containers are welded with the --weld-nested-containers parameter. This is related to issue git #45. - Merged pull request git #46 which fixes the docs regarding the -fse flag. - - This release is being made to make available a number of new formatting - parameters. No significant bugs have been found since the previous release, - but several minor issues have been found and fixed as listed below. - - Fixed issue git #45, -vtc=n flag was ignored when -wn was set. - implement request RT #133649, delete-old-newlines selectively. Two parameters, @@ -61,9 +65,6 @@ - Added 'state' as a keyword. - - This version is about 20% faster than the previous version due to optimizations - made with the help of Devel::NYTProf. - - A better test for convergence has been added. When iterations are requested, the new test will stop after the first pass if no changes in line break locations are made. Previously, file checksums were used and required at least two diff --git a/MANIFEST b/MANIFEST index c0347468..52ef8683 100644 --- a/MANIFEST +++ b/MANIFEST @@ -72,6 +72,7 @@ t/snippets2.t t/snippets20.t t/snippets21.t t/snippets22.t +t/snippets23.t t/snippets3.t t/snippets4.t t/snippets5.t diff --git a/bin/perltidy b/bin/perltidy index 0822f664..ad75b5b3 100755 --- a/bin/perltidy +++ b/bin/perltidy @@ -4560,7 +4560,7 @@ The perltidy binary uses the Perl::Tidy module and is installed when that module =head1 VERSION -This man page documents perltidy version 20201001.03 +This man page documents perltidy version 20201202 =head1 BUG REPORTS diff --git a/docs/BugLog.html b/docs/BugLog.html index 507b17cf..401ad56c 100644 --- a/docs/BugLog.html +++ b/docs/BugLog.html @@ -21,10 +21,28 @@
+
removed excess spaces in a package declaration
+
+ +

Testing revealed that for a line such as

+ +
   package        Bob::Dog;
+ +

which has extra spaces or even tabs after the keyword 'package', the extra spaces or tabs were not being removed. This was fixed 28 Nov 2020, 008443d. The line now formats to

+ +
    package Bob::Dog;
+ +
+
do not automatically delete closing side comments with --indent-only
+
+ +

For the parameter combination --indent-only and --closing-side-comments, old closing side comments were getting deleted but new closing side comments were not made. A fix was made to prevent this deletion. This fix was made 27 Nov 2020, 957e0ca.

+ +
fix to stop at 1 iteration when using --indent-only
-

Previously, for the combination --indent-only and -conv, two iterations would be done. Only one iteration is necessary in this case.

+

Previously, for the combination --indent-only and -conv, two iterations would be done. Only one iteration is necessary in this case. Fix made 23 Nov 2020, ae493d8.

fix for formatting signed numbers with spaces
@@ -42,7 +60,7 @@
    @london = ( deg2rad(-0.5), deg2rad( 90 - 51.3 ) );
-

Notice that the space within the parens around the '-0.5' is gone. An update was made to fix this, so that the final state is reached in one step. This fix was made 23 Nov 2020.

+

Notice that the space within the parens around the '-0.5' is gone. An update was made to fix this, so that the final state is reached in one step. This fix was made 23 Nov 2020, f477c8b.

fix to prevent conversion of a block comment to hanging side comment
@@ -60,11 +78,11 @@

For the following specific contitions the block comment in line 2 could be converted into a hanging side comment, which is undesirable:

-
   1. It contains nothing except for a '#'
+
   1. The line contains nothing except for a '#' with no leading space
    2. It follows a line with side comment
    3. It has indentation level > 0
-

An update was made to prevent this from happening. There are two cases, depending on the value of --maximum-consecutive-blank-lines, or -mbl. If this value is positive (the default) then a blank line is inserted above the block comment to prevent it from becoming a hanging side comment. If this -mbl is zero, then the comment is converted to be a static block comment which again prevents it from becoming a hanging side comment. This fix was made 23 Nov 2020.

+

An update was made to prevent this from happening. There are two cases, depending on the value of --maximum-consecutive-blank-lines, or -mbl. If this value is positive (the default) then a blank line is inserted above the block comment to prevent it from becoming a hanging side comment. If this -mbl is zero, then the comment is converted to be a static block comment which again prevents it from becoming a hanging side comment. This fix was made 23 Nov 2020, 2eb3de1.

improved convergence test
@@ -94,7 +112,7 @@ elsif ( !$m0 && $m1 ) { $CONFIG[1] = 1; } else { $ok = 0; last; }
-

This update was made 15 Nov 2020.

+

This update was made 15 Nov 2020, 2b7784d.

added option -wnxl=s to give control of welding by the -wn parameter
diff --git a/docs/ChangeLog.html b/docs/ChangeLog.html index 1148de75..f5905397 100644 --- a/docs/ChangeLog.html +++ b/docs/ChangeLog.html @@ -1,16 +1,20 @@

Perltidy Change Log

-

2020 10 01.03

+

2020 12 02

-
- Added flag -wnxl=s, --weld-nested-exclusion-list=s, to provide control which containers
+
- This release is being made primarily to make available a several new formatting 
+  parameters, in particular -xci, -kbb=s, -kba=s, and -wnxl=s. No significant 
+  bugs have been found since the previous release, but numerous minor issues have 
+  been found and fixed as listed below.
+
+- This version is about 20% faster than the previous version due to optimizations
+  made with the help of Devel::NYTProf.
+
+- Added flag -wnxl=s, --weld-nested-exclusion-list=s, to provide control which containers
   are welded with the --weld-nested-containers parameter.  This is related to issue git #45.
 
 - Merged pull request git #46 which fixes the docs regarding the -fse flag.
 
-- This release is being made to make available a number of new formatting 
-  parameters. No significant bugs have been found since the previous release, 
-  but several minor issues have been found and fixed as listed below.
-
 - Fixed issue git #45, -vtc=n flag was ignored when -wn was set.
 
 - implement request RT #133649, delete-old-newlines selectively. Two parameters, 
@@ -61,9 +65,6 @@
 
 - Added 'state' as a keyword.
 
-- This version is about 20% faster than the previous version due to optimizations
-  made with the help of Devel::NYTProf.
-
 - A better test for convergence has been added. When iterations are requested,
   the new test will stop after the first pass if no changes in line break
   locations are made.  Previously, file checksums were used and required at least two 
diff --git a/docs/Tidy.html b/docs/Tidy.html
index cce2bf0d..5b0221b2 100644
--- a/docs/Tidy.html
+++ b/docs/Tidy.html
@@ -372,7 +372,7 @@
 
 

VERSION

-

This man page documents Perl::Tidy version 20201001.03

+

This man page documents Perl::Tidy version 20201202

LICENSE

diff --git a/docs/perltidy.html b/docs/perltidy.html index edcbeda8..1a5be9e1 100644 --- a/docs/perltidy.html +++ b/docs/perltidy.html @@ -534,7 +534,7 @@
-conv, --converge
-

This flag is equivalent to -it=4 and is included to simplify iteration control. For all practical purposes one either does or does not want to be sure that the output is converged, and there is no penalty to using a large iteration limit since perltidy will check for convergence and stop iterating as soon as possible. The default is -nconv (no convergence check). Using -conv will approximately double run time since normally one extra iteration is required to verify convergence.

+

This flag is equivalent to -it=4 and is included to simplify iteration control. For all practical purposes one either does or does not want to be sure that the output is converged, and there is no penalty to using a large iteration limit since perltidy will check for convergence and stop iterating as soon as possible. The default is -nconv (no convergence check). Using -conv will approximately double run time since typically one extra iteration is required to verify convergence. No extra iterations are required if no new line breaks are made, and two extra iterations are occasionally needed when reformatting complex code structures, such as deeply nested ternary statements.

@@ -3522,7 +3522,7 @@

VERSION

-

This man page documents perltidy version 20201001.03

+

This man page documents perltidy version 20201202

BUG REPORTS

diff --git a/lib/Perl/Tidy.pm b/lib/Perl/Tidy.pm index b71b3db1..5160a4b3 100644 --- a/lib/Perl/Tidy.pm +++ b/lib/Perl/Tidy.pm @@ -110,7 +110,7 @@ BEGIN { # Release version must be bumped, and it is probably past time for a # release anyway. - $VERSION = '20201001.03'; + $VERSION = '20201202'; } sub DESTROY { @@ -1456,7 +1456,7 @@ EOM elsif ($do_convergence_test) { # stop if the formatter has converged - $stop_now ||= defined($iteration_of_formatter_convergence); + $stop_now ||= defined($iteration_of_formatter_convergence); my $digest = $md5_hex->($sink_buffer); if ( !defined( $saw_md5{$digest} ) ) { @@ -1473,8 +1473,12 @@ EOM # end states. This has happened in the past # but at present there are no known instances. $convergence_log_message = <write_diagnostics( $convergence_log_message) if $diagnostics_object; @@ -1496,17 +1500,24 @@ EOM if ($stop_now) { - if (DEVEL_MODE) { #<<< - if ( defined($iteration_of_formatter_convergence) ) { - if ( $iteration_of_formatter_convergence < $iter - 1 ) { - print STDERR + if (DEVEL_MODE) { + + if ( defined($iteration_of_formatter_convergence) ) { + + # This message cannot appear unless the formatter + # convergence test above is temporarily skipped for + # testing. + if ( $iteration_of_formatter_convergence < + $iter - 1 ) + { + print STDERR "STRANGE Early conv in $display_name: Stopping on it=$iter, converged in formatter on $iteration_of_formatter_convergence\n"; + } } - } - elsif ( !$stopping_on_error ) { - print STDERR + elsif ( !$stopping_on_error ) { + print STDERR "STRANGE no conv in $display_name: stopping on it=$iter, but not converged in formatter\n"; - } + } } # we are stopping the iterations early; diff --git a/lib/Perl/Tidy.pod b/lib/Perl/Tidy.pod index dd87a9e1..9ff8b49e 100644 --- a/lib/Perl/Tidy.pod +++ b/lib/Perl/Tidy.pod @@ -432,7 +432,7 @@ The module 'Perl::Tidy' comes with a binary 'perltidy' which is installed when t =head1 VERSION -This man page documents Perl::Tidy version 20201001.03 +This man page documents Perl::Tidy version 20201202 =head1 LICENSE diff --git a/lib/Perl/Tidy/Debugger.pm b/lib/Perl/Tidy/Debugger.pm index eb3ad933..def7d724 100644 --- a/lib/Perl/Tidy/Debugger.pm +++ b/lib/Perl/Tidy/Debugger.pm @@ -7,7 +7,7 @@ package Perl::Tidy::Debugger; use strict; use warnings; -our $VERSION = '20201001.03'; +our $VERSION = '20201202'; sub new { diff --git a/lib/Perl/Tidy/DevNull.pm b/lib/Perl/Tidy/DevNull.pm index 6a416c19..9ad7ae22 100644 --- a/lib/Perl/Tidy/DevNull.pm +++ b/lib/Perl/Tidy/DevNull.pm @@ -7,7 +7,7 @@ package Perl::Tidy::DevNull; use strict; use warnings; -our $VERSION = '20201001.03'; +our $VERSION = '20201202'; sub new { my $self = shift; return bless {}, $self } sub print { return } sub close { return } diff --git a/lib/Perl/Tidy/Diagnostics.pm b/lib/Perl/Tidy/Diagnostics.pm index 57c1ceb7..cf83d274 100644 --- a/lib/Perl/Tidy/Diagnostics.pm +++ b/lib/Perl/Tidy/Diagnostics.pm @@ -20,7 +20,7 @@ package Perl::Tidy::Diagnostics; use strict; use warnings; -our $VERSION = '20201001.03'; +our $VERSION = '20201202'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/FileWriter.pm b/lib/Perl/Tidy/FileWriter.pm index a75d1e02..63b7fde0 100644 --- a/lib/Perl/Tidy/FileWriter.pm +++ b/lib/Perl/Tidy/FileWriter.pm @@ -7,7 +7,7 @@ package Perl::Tidy::FileWriter; use strict; use warnings; -our $VERSION = '20201001.03'; +our $VERSION = '20201202'; use constant DEVEL_MODE => 0; diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 9fbb899a..916df977 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -49,7 +49,7 @@ use constant DEVEL_MODE => 0; { #<<< A non-indenting brace to contain all lexical variables use Carp; -our $VERSION = '20201001.03'; +our $VERSION = '20201202'; # The Tokenizer will be loaded with the Formatter ##use Perl::Tidy::Tokenizer; # for is_keyword() diff --git a/lib/Perl/Tidy/HtmlWriter.pm b/lib/Perl/Tidy/HtmlWriter.pm index da6fb076..e8413511 100644 --- a/lib/Perl/Tidy/HtmlWriter.pm +++ b/lib/Perl/Tidy/HtmlWriter.pm @@ -7,7 +7,7 @@ package Perl::Tidy::HtmlWriter; use strict; use warnings; -our $VERSION = '20201001.03'; +our $VERSION = '20201202'; use File::Basename; diff --git a/lib/Perl/Tidy/IOScalar.pm b/lib/Perl/Tidy/IOScalar.pm index 3cb64295..92665cca 100644 --- a/lib/Perl/Tidy/IOScalar.pm +++ b/lib/Perl/Tidy/IOScalar.pm @@ -10,7 +10,7 @@ package Perl::Tidy::IOScalar; use strict; use warnings; use Carp; -our $VERSION = '20201001.03'; +our $VERSION = '20201202'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/IOScalarArray.pm b/lib/Perl/Tidy/IOScalarArray.pm index d4cee2d5..fb782fd3 100644 --- a/lib/Perl/Tidy/IOScalarArray.pm +++ b/lib/Perl/Tidy/IOScalarArray.pm @@ -14,7 +14,7 @@ package Perl::Tidy::IOScalarArray; use strict; use warnings; use Carp; -our $VERSION = '20201001.03'; +our $VERSION = '20201202'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/IndentationItem.pm b/lib/Perl/Tidy/IndentationItem.pm index 674bc162..5ded75a1 100644 --- a/lib/Perl/Tidy/IndentationItem.pm +++ b/lib/Perl/Tidy/IndentationItem.pm @@ -8,7 +8,7 @@ package Perl::Tidy::IndentationItem; use strict; use warnings; -our $VERSION = '20201001.03'; +our $VERSION = '20201202'; BEGIN { diff --git a/lib/Perl/Tidy/LineBuffer.pm b/lib/Perl/Tidy/LineBuffer.pm index ac368115..02a85f06 100644 --- a/lib/Perl/Tidy/LineBuffer.pm +++ b/lib/Perl/Tidy/LineBuffer.pm @@ -12,7 +12,7 @@ package Perl::Tidy::LineBuffer; use strict; use warnings; -our $VERSION = '20201001.03'; +our $VERSION = '20201202'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/LineSink.pm b/lib/Perl/Tidy/LineSink.pm index bfec95b7..084e145f 100644 --- a/lib/Perl/Tidy/LineSink.pm +++ b/lib/Perl/Tidy/LineSink.pm @@ -8,7 +8,7 @@ package Perl::Tidy::LineSink; use strict; use warnings; -our $VERSION = '20201001.03'; +our $VERSION = '20201202'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/LineSource.pm b/lib/Perl/Tidy/LineSource.pm index 0ceb95b7..8c3e0c39 100644 --- a/lib/Perl/Tidy/LineSource.pm +++ b/lib/Perl/Tidy/LineSource.pm @@ -8,7 +8,7 @@ package Perl::Tidy::LineSource; use strict; use warnings; -our $VERSION = '20201001.03'; +our $VERSION = '20201202'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/Logger.pm b/lib/Perl/Tidy/Logger.pm index 4f197ba8..d48a973f 100644 --- a/lib/Perl/Tidy/Logger.pm +++ b/lib/Perl/Tidy/Logger.pm @@ -7,7 +7,7 @@ package Perl::Tidy::Logger; use strict; use warnings; -our $VERSION = '20201001.03'; +our $VERSION = '20201202'; sub AUTOLOAD { diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm index b5cdb620..691af758 100644 --- a/lib/Perl/Tidy/Tokenizer.pm +++ b/lib/Perl/Tidy/Tokenizer.pm @@ -21,7 +21,7 @@ package Perl::Tidy::Tokenizer; use strict; use warnings; -our $VERSION = '20201001.03'; +our $VERSION = '20201202'; use Perl::Tidy::LineBuffer; use Carp; @@ -1636,8 +1636,8 @@ sub prepare_for_a_new_file { # If it does not find one of these, or this is a restart, it calls the # original scanner directly. - # This gives the same results as the full scanner in about 1/4 the - # total runtime for a typical input stream. + # This gives the same results as the full scanner in about 1/4 the + # total runtime for a typical input stream. my $i_begin = $i; my $tok_begin = $tok; diff --git a/lib/Perl/Tidy/VerticalAligner.pm b/lib/Perl/Tidy/VerticalAligner.pm index 978d5fbc..19922f55 100644 --- a/lib/Perl/Tidy/VerticalAligner.pm +++ b/lib/Perl/Tidy/VerticalAligner.pm @@ -1,7 +1,7 @@ package Perl::Tidy::VerticalAligner; use strict; use warnings; -our $VERSION = '20201001.03'; +our $VERSION = '20201202'; use Perl::Tidy::VerticalAligner::Alignment; use Perl::Tidy::VerticalAligner::Line; diff --git a/lib/Perl/Tidy/VerticalAligner/Alignment.pm b/lib/Perl/Tidy/VerticalAligner/Alignment.pm index 9ab45cf4..e6b0ecab 100644 --- a/lib/Perl/Tidy/VerticalAligner/Alignment.pm +++ b/lib/Perl/Tidy/VerticalAligner/Alignment.pm @@ -10,7 +10,7 @@ use warnings; { #<<< A non-indenting brace -our $VERSION = '20201001.03'; +our $VERSION = '20201202'; # _column_ # the current column number # _saved_column_ # a place for temporary storage diff --git a/lib/Perl/Tidy/VerticalAligner/Line.pm b/lib/Perl/Tidy/VerticalAligner/Line.pm index 49044deb..a747adb9 100644 --- a/lib/Perl/Tidy/VerticalAligner/Line.pm +++ b/lib/Perl/Tidy/VerticalAligner/Line.pm @@ -8,7 +8,7 @@ package Perl::Tidy::VerticalAligner::Line; use strict; use warnings; -our $VERSION = '20201001.03'; +our $VERSION = '20201202'; BEGIN { my $i = 0; diff --git a/local-docs/BugLog.pod b/local-docs/BugLog.pod index 1e83ebbb..44c5f5c1 100644 --- a/local-docs/BugLog.pod +++ b/local-docs/BugLog.pod @@ -9,7 +9,7 @@ Testing revealed that for a line such as package Bob::Dog; which has extra spaces or even tabs after the keyword 'package', the -extra spaces or tabs were not being removed. This was fixed 28 Nov 2020. +extra spaces or tabs were not being removed. This was fixed 28 Nov 2020, 008443d. The line now formats to package Bob::Dog; @@ -18,12 +18,12 @@ The line now formats to For the parameter combination --indent-only and --closing-side-comments, old closing side comments were getting deleted but new closing side comments were -not made. A fix was made to prevent this deletion. This fix was made 27 Nov 2020. +not made. A fix was made to prevent this deletion. This fix was made 27 Nov 2020, 957e0ca. =item B Previously, for the combination --indent-only and -conv, two iterations -would be done. Only one iteration is necessary in this case. +would be done. Only one iteration is necessary in this case. Fix made 23 Nov 2020, ae493d8. =item B @@ -46,7 +46,7 @@ The next time it is formatted, the '-0.5' counts as one token, resulting in Notice that the space within the parens around the '-0.5' is gone. An update was made to fix this, so that the final state is reached in one step. This fix -was made 23 Nov 2020. +was made 23 Nov 2020, f477c8b. =item B @@ -64,7 +64,7 @@ be converted to be a hanging side comment. For example: For the following specific contitions the block comment in line 2 could be converted into a hanging side comment, which is undesirable: - 1. It contains nothing except for a '#' + 1. The line contains nothing except for a '#' with no leading space 2. It follows a line with side comment 3. It has indentation level > 0 @@ -74,7 +74,7 @@ value is positive (the default) then a blank line is inserted above the block comment to prevent it from becoming a hanging side comment. If this -mbl is zero, then the comment is converted to be a static block comment which again prevents it from becoming a hanging side comment. This fix was made 23 Nov -2020. +2020, 2eb3de1. =item B @@ -107,7 +107,7 @@ loss of alignment in some cases. For example elsif ( !$m0 && $m1 ) { $CONFIG[1] = 1; } else { $ok = 0; last; } -This update was made 15 Nov 2020. +This update was made 15 Nov 2020, 2b7784d. =item B diff --git a/t/snippets/perltidy_common_flags.pl b/t/snippets/perltidy_common_flags.pl new file mode 100755 index 00000000..700771ce --- /dev/null +++ b/t/snippets/perltidy_common_flags.pl @@ -0,0 +1,22 @@ +#!/usr/bin/perl -w +use strict; +my @files = @ARGV; +my %saw; +# Look at a number of .pro profiles and show ther common flags. +# This can help pinpoint the flags which are causing an issue. +foreach my $file (@files) { + open( IN, "<", $file ) || die "cannot open $file: $!\n"; + while ( my $line = ) { + chomp $line; + $line =~ s/^\s+//; + $line =~ s/\s+$//; + next if ( $line =~ /#/ ); + $saw{$line}++; + } + close IN; +} +my $nfiles=@files; +foreach my $key(sort keys %saw) { + next if ($saw{$key} != $nfiles); + print $key,"\n"; +} diff --git a/t/snippets/perltidy_random_run.pl b/t/snippets/perltidy_random_run.pl index 2fa52819..8036b9c5 100755 --- a/t/snippets/perltidy_random_run.pl +++ b/t/snippets/perltidy_random_run.pl @@ -343,10 +343,7 @@ for (my $nf=$nf_beg; $nf<=$nf_end; $nf++) { # Set input file for next run $ifile = $ifile_original; - if ( $case < 4 ) { - $ifile = $ofile; - } - elsif ( $chain_mode && !$err ) { + if ( $case >= 4 && $chain_mode && !$err ) { # 'Chaining' means the next run formats the output of the previous # run instead of formatting the original file. # 0 = no chaining diff --git a/t/snippets/perltidy_random_setup.pl b/t/snippets/perltidy_random_setup.pl index e7e85073..4aa10d02 100755 --- a/t/snippets/perltidy_random_setup.pl +++ b/t/snippets/perltidy_random_setup.pl @@ -872,7 +872,7 @@ EOM # Case 2 creates the smallest possible output file size if ( $case == 2 ) { - $rrandom_parameters = ["--mangle -dsc -dac -i=0 -ci=0 -it=2"]; + $rrandom_parameters = ["-dsm -dac -i=0 -ci=0 -it=2 -mbl=0"]; } # Case 3 checks extrude from mangle (case 2) -- 2.39.5