From: Steve Hancock Date: Thu, 29 Oct 2020 14:33:07 +0000 (-0700) Subject: added test case for parameter -nlop X-Git-Tag: 20201001.03~26 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=12b383310ce6cc58050930cd5fda030c9f941ca8;p=perltidy.git added test case for parameter -nlop --- diff --git a/t/snippets/expect/lop.def b/t/snippets/expect/lop.def index e8777483..bd1edbd5 100644 --- a/t/snippets/expect/lop.def +++ b/t/snippets/expect/lop.def @@ -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/ ) diff --git a/t/snippets/expect/lop.lop b/t/snippets/expect/lop.lop index e9ce0a54..4c564808 100644 --- a/t/snippets/expect/lop.lop +++ b/t/snippets/expect/lop.lop @@ -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/ ) diff --git a/t/snippets/lop.in b/t/snippets/lop.in index 283b1b9c..c889168b 100644 --- a/t/snippets/lop.in +++ b/t/snippets/lop.in @@ -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/ ) diff --git a/t/snippets20.t b/t/snippets20.t index d6ed5915..58b30747 100644 --- a/t/snippets20.t +++ b/t/snippets20.t @@ -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........... }, }; diff --git a/t/snippets21.t b/t/snippets21.t index a565dd8b..155d9648 100644 --- a/t/snippets21.t +++ b/t/snippets21.t @@ -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........... },