]> git.donarmstrong.com Git - perltidy.git/commitdiff
fix test wn7 for rule adjustment
authorSteve Hancock <perltidy@users.sourceforge.net>
Thu, 2 Apr 2020 14:36:16 +0000 (07:36 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Thu, 2 Apr 2020 14:36:16 +0000 (07:36 -0700)
t/snippets/expect/wn7.def
t/snippets/expect/wn7.wn
t/snippets/wn7.in
t/snippets17.t

index 0e8c99235c5f244a638c84548afe2cd50b62ce36..c2618e3b0777e14f42d81b215249a75bdee04c49 100644 (file)
@@ -1,9 +1,7 @@
-                    # illustrate wn rule 2b: do not weld to opening hash brace
-                    # if closing brace is not >=2 lines away
+                    # do not weld paren to opening one-line non-paren container
                     $Self->_Add(
                         $SortOrderDisplay{ $Field->GenerateFieldForSelectSQL() }
                     );
 
-                    # rule 2a forerly applied to all blocks, but now only
-                    # applies to subs, so this weld is now okay with -wn
+                    # this weld is now okay with -wn
                     f( do { 1; !!( my $x = bless [] ); } );
index 0e8c99235c5f244a638c84548afe2cd50b62ce36..c2618e3b0777e14f42d81b215249a75bdee04c49 100644 (file)
@@ -1,9 +1,7 @@
-                    # illustrate wn rule 2b: do not weld to opening hash brace
-                    # if closing brace is not >=2 lines away
+                    # do not weld paren to opening one-line non-paren container
                     $Self->_Add(
                         $SortOrderDisplay{ $Field->GenerateFieldForSelectSQL() }
                     );
 
-                    # rule 2a forerly applied to all blocks, but now only
-                    # applies to subs, so this weld is now okay with -wn
+                    # this weld is now okay with -wn
                     f( do { 1; !!( my $x = bless [] ); } );
index 198d790b2da0c35a170729415778060e37614bdc..c16f5298ec1ca463137f8573e6f9962400803800 100644 (file)
@@ -1,10 +1,7 @@
-                   # illustrate wn rule 2b: do not weld to opening hash brace
-                   # if closing brace is not >=2 lines away
-                    $Self->_Add($SortOrderDisplay{$Field
-                           ->GenerateFieldForSelectSQL()});
+                   # do not weld paren to opening one-line non-paren container
+                    $Self->_Add($SortOrderDisplay{$Field->GenerateFieldForSelectSQL()});
 
-                   # rule 2a forerly applied to all blocks, but now only
-                   # applies to subs, so this weld is now okay with -wn
+                   # this weld is now okay with -wn
                    f(
                      do { 1; !!(my $x = bless []); }
                    );
index 15aac77fb33a51806eb30c61753972c2079850d7..2623786e8ba5284c8708090b77c532468422aa8b 100644 (file)
@@ -87,13 +87,10 @@ my $subref = sub ( $cat, $id = do { state $auto_id = 0; $auto_id++ } ) {
 ----------
 
         'wn7' => <<'----------',
-                   # illustrate wn rule 2b: do not weld to opening hash brace
-                   # if closing brace is not >=2 lines away
-                    $Self->_Add($SortOrderDisplay{$Field
-                           ->GenerateFieldForSelectSQL()});
+                   # do not weld paren to opening one-line non-paren container
+                    $Self->_Add($SortOrderDisplay{$Field->GenerateFieldForSelectSQL()});
 
-                   # rule 2a forerly applied to all blocks, but now only
-                   # applies to subs, so this weld is now okay with -wn
+                   # this weld is now okay with -wn
                    f(
                      do { 1; !!(my $x = bless []); }
                    );
@@ -223,14 +220,12 @@ sub foo_subroutine_in_main {
             source => "wn7",
             params => "def",
             expect => <<'#6...........',
-                    # illustrate wn rule 2b: do not weld to opening hash brace
-                    # if closing brace is not >=2 lines away
+                    # do not weld paren to opening one-line non-paren container
                     $Self->_Add(
                         $SortOrderDisplay{ $Field->GenerateFieldForSelectSQL() }
                     );
 
-                    # rule 2a forerly applied to all blocks, but now only
-                    # applies to subs, so this weld is now okay with -wn
+                    # this weld is now okay with -wn
                     f( do { 1; !!( my $x = bless [] ); } );
 #6...........
         },
@@ -239,14 +234,12 @@ sub foo_subroutine_in_main {
             source => "wn7",
             params => "wn",
             expect => <<'#7...........',
-                    # illustrate wn rule 2b: do not weld to opening hash brace
-                    # if closing brace is not >=2 lines away
+                    # do not weld paren to opening one-line non-paren container
                     $Self->_Add(
                         $SortOrderDisplay{ $Field->GenerateFieldForSelectSQL() }
                     );
 
-                    # rule 2a forerly applied to all blocks, but now only
-                    # applies to subs, so this weld is now okay with -wn
+                    # this weld is now okay with -wn
                     f( do { 1; !!( my $x = bless [] ); } );
 #7...........
         },