]> git.donarmstrong.com Git - perltidy.git/commitdiff
added test case for parameter -nlop
authorSteve Hancock <perltidy@users.sourceforge.net>
Thu, 29 Oct 2020 14:33:07 +0000 (07:33 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Thu, 29 Oct 2020 14:33:07 +0000 (07:33 -0700)
t/snippets/expect/lop.def
t/snippets/expect/lop.lop
t/snippets/lop.in
t/snippets20.t
t/snippets21.t

index e8777483a24405730f898eeab0b38ec5499328ae..bd1edbd508ab71d399ee5c656f78a04eb0a38c9a 100644 (file)
@@ -15,3 +15,7 @@ $bits =
 lc(      $self->mime_attr('content-type')
       || $self->{MIH_DefaultType}
       || 'text/plain' );
+
+# Padding can also remove spaces; here the space after the '(' is lost:
+elsif ($statement_type =~ /^sub\b/
+    || $paren_type[$paren_depth] =~ /^sub\b/ )
index e9ce0a54d66d11f9590f0e95a075d3d92155dac6..4c564808479645c2bc9b69a5f173eede64ffae7b 100644 (file)
@@ -15,3 +15,7 @@ $bits =
 lc( $self->mime_attr('content-type')
       || $self->{MIH_DefaultType}
       || 'text/plain' );
+
+# Padding can also remove spaces; here the space after the '(' is lost:
+elsif ( $statement_type =~ /^sub\b/
+    || $paren_type[$paren_depth] =~ /^sub\b/ )
index 283b1b9c4af6b4a7c872b5c52011f47e1f9e26f7..c889168b068ea6cb1e0a34d4abadbd53f1d02aa1 100644 (file)
@@ -15,3 +15,7 @@ $bits =
 lc( $self->mime_attr('content-type')
         || $self->{MIH_DefaultType}
         || 'text/plain' );
+
+# Padding can also remove spaces; here the space after the '(' is lost:
+elsif ( $statement_type =~ /^sub\b/
+    || $paren_type[$paren_depth] =~ /^sub\b/ )
index d6ed59153ddb4f8871b4dcd8e301fac50e23f499..58b30747a9a52664602b9c5385c5cb1ff1ee2683 100644 (file)
@@ -173,6 +173,10 @@ $bits =
 lc( $self->mime_attr('content-type')
         || $self->{MIH_DefaultType}
         || 'text/plain' );
+
+# Padding can also remove spaces; here the space after the '(' is lost:
+elsif ( $statement_type =~ /^sub\b/
+    || $paren_type[$paren_depth] =~ /^sub\b/ )
 ----------
 
         'outdent' => <<'----------',
@@ -643,6 +647,10 @@ $bits =
 lc(      $self->mime_attr('content-type')
       || $self->{MIH_DefaultType}
       || 'text/plain' );
+
+# Padding can also remove spaces; here the space after the '(' is lost:
+elsif ($statement_type =~ /^sub\b/
+    || $paren_type[$paren_depth] =~ /^sub\b/ )
 #19...........
         },
     };
index a565dd8bbe0b58e8d029c5adf924b6d6b4042cc9..155d96485697a7f907b49d21781f04894cd55bfd 100644 (file)
@@ -125,6 +125,10 @@ $bits =
 lc( $self->mime_attr('content-type')
         || $self->{MIH_DefaultType}
         || 'text/plain' );
+
+# Padding can also remove spaces; here the space after the '(' is lost:
+elsif ( $statement_type =~ /^sub\b/
+    || $paren_type[$paren_depth] =~ /^sub\b/ )
 ----------
 
         'nib' => <<'----------',
@@ -330,6 +334,10 @@ $bits =
 lc( $self->mime_attr('content-type')
       || $self->{MIH_DefaultType}
       || 'text/plain' );
+
+# Padding can also remove spaces; here the space after the '(' is lost:
+elsif ( $statement_type =~ /^sub\b/
+    || $paren_type[$paren_depth] =~ /^sub\b/ )
 #1...........
         },