]> git.donarmstrong.com Git - perltidy.git/commitdiff
fix b1501
authorSteve Hancock <perltidy@users.sourceforge.net>
Tue, 26 Nov 2024 17:51:51 +0000 (09:51 -0800)
committerSteve Hancock <perltidy@users.sourceforge.net>
Tue, 26 Nov 2024 17:51:51 +0000 (09:51 -0800)
dev-bin/run_convergence_tests.pl.data
dev-bin/run_convergence_tests.pl.expect
lib/Perl/Tidy/Formatter.pm

index 4e2f20a794ae21abb758fcbb92c8d678b1e2990c..82b85529aceaa9f631619646b0299d65c128702b 100644 (file)
@@ -12501,6 +12501,39 @@ $config = {
 --keep-old-breakpoints-after='t q .= ^.= .. i x R -> J'
 --break-at-trailing-comma-types='1'
 
+==> b1501.in <==
+my%S3d_url=(
+  'emotif'=>$SGD_stem_url{'s3d'}
+    .'seq_search.pl?db=emotif&gene=',
+  'pfam'=>$SGD_stem_url{'s3d'}.'seq_search.pl?db=pfam&gene=',
+  'pfam_uk'=>$SGD_stem_url{'s3d'}
+    .'seq_search.pl?db=pfam&loc=uk&gene=',
+  'pfam_us'=>$SGD_stem_url{'s3d'}
+    .'seq_search.pl?db=pfam&loc=us&gene=',
+  'blast_nr'=>$SGD_stem_url{'s3d'}.'getblast?db=nr&name=',
+  'blast_est'=>$SGD_stem_url{'s3d'}.'getblast?db=est&name=',
+  'blast_mammal'=>$SGD_stem_url{'s3d'}
+    .'getblast?db=mammal&name=',
+  'blast_human'=>$SGD_stem_url{'s3d'}
+    .'getblast?db=human&name=',
+  'blast_worm'=>$SGD_stem_url{'s3d'}
+    .'getblast?db=worm&name=',
+  'blast_yeast'=>$SGD_stem_url{'s3d'}
+    .'getblast?db=yeast&name=',
+  'blast_worm_yeast'=>$SGD_stem_url{'s3d'}
+    .'getblast?db=worm&query=worm&name=',
+  'patmatch'=>$SGD_stem_url{'s3d2'}.'grepmatch?',##comment
+  'grepmatch'=>$SGD_stem_url{'s3d2'}.'grepmatch?',
+  'pdb_neighbors'=>$SGD_stem_url{'s3d'}
+    .'pdb_neighbors?id=CHAIN&gene=ORF_NAME'
+);
+
+==> b1501.par <==
+--maximum-line-length=61
+--indent-columns=3
+--noadd-whitespace
+--extended-line-up-parentheses
+
 ==> b156.in <==
 # State 1
 {
index b107cee764b80c28d35bda3c43e32db5345d8ff3..6f91b8a1d3fbbcf728917e6650798d1e391b8b85 100644 (file)
@@ -7892,10 +7892,11 @@ BEGIN {
                                     qw( *_RemoteIPAddr V_SessionType )
                   ],
                   0x93 => [
-                             ConfigStat =>qw( Z16_DeviceName V_StationUserID
-                             V_StationUserInstance
-                             Z16_UserName Z16_ServerName
-                             V_NumberLines V_NumberSpeedDials )
+                           ConfigStat =>
+                                    qw( Z16_DeviceName V_StationUserID
+                                    V_StationUserInstance
+                                    Z16_UserName Z16_ServerName
+                                    V_NumberLines V_NumberSpeedDials )
                   ],
          ) ;
 }
@@ -7907,10 +7908,11 @@ BEGIN {
                                     qw( *_RemoteIPAddr V_SessionType )
                   ],
                   0x93 => [
-                             ConfigStat =>qw( Z16_DeviceName V_StationUserID
-                             V_StationUserInstance
-                             Z16_UserName Z16_ServerName
-                             V_NumberLines V_NumberSpeedDials )
+                           ConfigStat =>
+                                    qw( Z16_DeviceName V_StationUserID
+                                    V_StationUserInstance
+                                    Z16_UserName Z16_ServerName
+                                    V_NumberLines V_NumberSpeedDials )
                   ],
          ) ;
 }
@@ -8118,50 +8120,51 @@ sub new{
                     },
                ],
                [
-                      '@1-3',
-                      0,
-                      sub{parse_value($_[2]->{ENCODING});},
+                    '@1-3',
+                    0,
+                    sub{parse_value($_[2]->{ENCODING});},
                ],
                ['params',0,sub{{}},],
                [
-                      'params',
-                      3,
-                      sub{
-                           my%hash;
-                           for(my$i=0;$i<@{$_[3]};$i+=2){
-                                push@{$hash{$_[3]->[$i]}},$_[3]->[$i+1];
-                           }
-                           \%hash;
-                      },
+                    'params',
+                    3,
+                    sub{
+                         my%hash;
+                         for(my$i=0;$i<@{$_[3]};$i+=2){
+                              push@{$hash{$_[3]->[$i]}},$_[3]->[$i+1];
+                         }
+                         \%hash;
+                    },
                ],
                [
-                      'paramlist',
-                      1,
-                      sub{$_[1]},
+                    'paramlist',
+                    1,
+                    sub{$_[1]},
                ],
                [
-                      'paramlist',
-                      5,
-                      sub{
-                           unshift(@{$_[1]},@{$_[5]},)if defined$_[5];
-                           $_[1];
-                      },
+                    'paramlist',
+                    5,
+                    sub{
+                         unshift(@{$_[1]},@{$_[5]},)if defined$_[5];
+                         $_[1];
+                    },
                ],
                [
-                      'param',
-                      5,
-                      sub{[uc($_[1]),uc($_[5]),]},
+                    'param',
+                    5,
+                    sub{[uc($_[1]),uc($_[5]),]},
                ],
                ['addressparts',1,sub{{"address",$_[1],}},],
                [
-                      'addressparts',
-                      3,
-                      sub{{"address",$_[1],"address2",$_[3],}},
+                    'addressparts',
+                    3,
+                    sub{{"address",$_[1],"address2",$_[3],}},
                ],
                [
-                      'addressparts',
-                      5,
-                      sub{{"address",$_[1],"address2",$_[3],"street",$_[5],}},
+                    'addressparts',
+                    5,
+                    sub{{"address",$_[1],"address2",$_[3],"street",$_[5],
+                    }},
                ],
           ],
           @_,
@@ -8449,6 +8452,34 @@ $config = {
     ppid  => $$,
 };
 
+==> b1501 <==
+my%S3d_url=(
+   'emotif'=>$SGD_stem_url{'s3d'}
+     .'seq_search.pl?db=emotif&gene=',
+   'pfam'=>$SGD_stem_url{'s3d'}
+     .'seq_search.pl?db=pfam&gene=',
+   'pfam_uk'=>$SGD_stem_url{'s3d'}
+     .'seq_search.pl?db=pfam&loc=uk&gene=',
+   'pfam_us'=>$SGD_stem_url{'s3d'}
+     .'seq_search.pl?db=pfam&loc=us&gene=',
+   'blast_nr'=>$SGD_stem_url{'s3d'}.'getblast?db=nr&name=',
+   'blast_est'=>$SGD_stem_url{'s3d'}.'getblast?db=est&name=',
+   'blast_mammal'=>$SGD_stem_url{'s3d'}
+     .'getblast?db=mammal&name=',
+   'blast_human'=>$SGD_stem_url{'s3d'}
+     .'getblast?db=human&name=',
+   'blast_worm'=>$SGD_stem_url{'s3d'}
+     .'getblast?db=worm&name=',
+   'blast_yeast'=>$SGD_stem_url{'s3d'}
+     .'getblast?db=yeast&name=',
+   'blast_worm_yeast'=>$SGD_stem_url{'s3d'}
+     .'getblast?db=worm&query=worm&name=',
+   'patmatch'=>$SGD_stem_url{'s3d2'}.'grepmatch?',##comment
+   'grepmatch'=>$SGD_stem_url{'s3d2'}.'grepmatch?',
+   'pdb_neighbors'=>$SGD_stem_url{'s3d'}
+     .'pdb_neighbors?id=CHAIN&gene=ORF_NAME'
+);
+
 ==> b156 <==
 # State 1
 {
index daf4ea646bf13859e0f416fc6eebbea53d20d1ee..9d7b195767df0d81c5422635a4aff65745128b32 100644 (file)
@@ -34970,10 +34970,14 @@ EOM
             }
             $available_spaces = $test_space_count - $min_gnu_indentation;
 
+            # Fix for combo -naws and -xlp (b1501; also b1466)
+            my $tol = !$rOpts_add_whitespace
+              && $rOpts_extended_line_up_parentheses ? 1 : 0;
+
             # Do not startup -lp indentation mode if no space ...
             # ... or if it puts the opening far to the right
             if ( !$in_lp_mode
-                && ( $available_spaces <= 0 || $next_opening_too_far ) )
+                && ( $available_spaces <= $tol || $next_opening_too_far ) )
             {
                 $space_count += $standard_increment;
                 $available_spaces = 0;