From 12b383310ce6cc58050930cd5fda030c9f941ca8 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Thu, 29 Oct 2020 07:33:07 -0700 Subject: [PATCH] added test case for parameter -nlop --- t/snippets/expect/lop.def | 4 ++++ t/snippets/expect/lop.lop | 4 ++++ t/snippets/lop.in | 4 ++++ t/snippets20.t | 8 ++++++++ t/snippets21.t | 8 ++++++++ 5 files changed, 28 insertions(+) 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........... }, -- 2.39.5