]> git.donarmstrong.com Git - perltidy.git/commitdiff
fix b1459, edge of stability issue for -xlp
authorSteve Hancock <perltidy@users.sourceforge.net>
Wed, 23 Aug 2023 18:37:50 +0000 (11:37 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Wed, 23 Aug 2023 18:37:50 +0000 (11:37 -0700)
dev-bin/run_convergence_tests.pl.data
dev-bin/run_convergence_tests.pl.expect
lib/Perl/Tidy/Formatter.pm

index 0b804bb5f083540f3885b497d0f41df8eb9cdd53..18e6388a5b651cb9973052d993e9a583ab47a628 100644 (file)
@@ -11685,6 +11685,58 @@ BEGIN {
 --want-trailing-commas='b'
 --delete-trailing-commas
 
+==> b1459.in <==
+# S1
+my @pics=
+ grep( -f "$dir/$_"
+   &&-s "$dir/$_"
+   &&!
+   -f "$dir/$_$NO_ALBUM"
+   &&!/\Q$NOT_IMG\E$/
+   &&!/\Q$NO_ALBUM\E$/
+   &&!/\.txt$/
+   &&!/\.htaccess$/
+   &&!/~$/
+   &&$_ ne
+   "$opt->{'index'}$HTML"
+   &&$_ ne $HEADER
+   &&$_ ne $FOOTER
+   &&
+
+   $_ ne$opt->{
+     'captions'},
+  @dir ) ;
+
+#S2
+my @pics=
+ grep( -f "$dir/$_"
+    &&-s "$dir/$_"
+    &&!
+    -f "$dir/$_$NO_ALBUM"
+    &&!/\Q$NOT_IMG\E$/
+    &&!/\Q$NO_ALBUM\E$/
+    &&!/\.txt$/
+    &&!/\.htaccess$/
+    &&!/~$/
+    &&$_ ne
+"$opt->{'index'}$HTML"
+    &&$_ ne $HEADER
+    &&$_ ne $FOOTER
+    &&
+
+    $_ ne
+    $opt->{'captions'},
+   @dir ) ;
+
+
+==> b1459.par <==
+--maximum-line-length=25
+--indent-columns=3
+--continuation-indentation=1
+--noadd-whitespace
+--extended-continuation-indentation
+--extended-line-up-parentheses
+
 ==> b146.in <==
 # State 1
 
index 8f81fc699a1f7fff73d29ca12ddbae72cfcf1e8f..5a8ec0e009a901b27daf0a8fb922bf7912d4f293 100644 (file)
@@ -7912,6 +7912,50 @@ BEGIN {
            @{ $me->{'mail_hdr_list'}
            }, );
 
+==> b1459 <==
+# S1
+my @pics=
+ grep( -f "$dir/$_"
+    &&-s "$dir/$_"
+    &&!
+    -f "$dir/$_$NO_ALBUM"
+    &&!/\Q$NOT_IMG\E$/
+    &&!/\Q$NO_ALBUM\E$/
+    &&!/\.txt$/
+    &&!/\.htaccess$/
+    &&!/~$/
+    &&$_ ne
+"$opt->{'index'}$HTML"
+    &&$_ ne $HEADER
+    &&$_ ne $FOOTER
+    &&
+
+    $_ ne$opt->{
+      'captions'},
+   @dir ) ;
+
+#S2
+my @pics=
+ grep( -f "$dir/$_"
+    &&-s "$dir/$_"
+    &&!
+    -f "$dir/$_$NO_ALBUM"
+    &&!/\Q$NOT_IMG\E$/
+    &&!/\Q$NO_ALBUM\E$/
+    &&!/\.txt$/
+    &&!/\.htaccess$/
+    &&!/~$/
+    &&$_ ne
+"$opt->{'index'}$HTML"
+    &&$_ ne $HEADER
+    &&$_ ne $FOOTER
+    &&
+
+    $_ ne$opt->{
+      'captions'},
+   @dir ) ;
+
+
 ==> b146 <==
 # State 1
 
index 4f51f9fcfc0d67e90fce88d9adf5fd7414f30dd9..c950b0bb2b72499751d2f2942f32a8881013e3da 100644 (file)
@@ -25604,6 +25604,11 @@ sub get_available_spaces_to_go {
             $rOpts_extended_line_up_parentheses = 0;
         }
 
+        # fix for b1459: -naws adds stress for -xlp
+        if ( $high_stress_level <= 2 && !$rOpts_add_whitespace ) {
+            $rOpts_extended_line_up_parentheses = 0;
+        }
+
         $rLP = [];
 
         # initialize the leading whitespace stack to negative levels