]> git.donarmstrong.com Git - perltidy.git/commitdiff
add test for format-skipping issue discussed in git #67
authorSteve Hancock <perltidy@users.sourceforge.net>
Sun, 11 Jul 2021 13:47:29 +0000 (06:47 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Sun, 11 Jul 2021 13:47:29 +0000 (06:47 -0700)
t/snippets/comments.in
t/snippets/expect/comments.comments1
t/snippets/expect/comments.comments2
t/snippets/expect/comments.comments3
t/snippets/expect/comments.comments4
t/snippets/expect/comments.comments5
t/snippets/expect/comments.def
t/snippets17.t
t/snippets18.t

index a8e39452b7729ab5ad860ad0103e4aa2c60f0f62..261c4db88b9a6c64ab9fe3d10150a666a570a40c 100644 (file)
@@ -1,5 +1,8 @@
 #!/usr/bin/perl -w
 # an initial hash bang line cannot be deleted with -dp
+#<<< format skipping of first code can cause an error message in perltidy v20210625
+my $rvar = [ [ 1, 2, 3 ], [ 4, 5, 6 ] ];
+#>>>
 sub length { return length($_[0]) }    # side comment
                              # hanging side comment
                              # very longgggggggggggggggggggggggggggggggggggggggggggggggggggg hanging side comment
index fbe3ff025d0120107763b5c5fdbca7d7435b1350..aedc7d89120a8d085a78f71f4b7aacb78fa3f2d0 100644 (file)
@@ -1,5 +1,8 @@
 #!/usr/bin/perl -w
 # an initial hash bang line cannot be deleted with -dp
+#<<< format skipping of first code can cause an error message in perltidy v20210625
+my $rvar = [ [ 1, 2, 3 ], [ 4, 5, 6 ] ];
+#>>>
 sub length { return length( $_[0] ) }  # side comment
 
 # hanging side comment
index 5eb3693a20cc600f6bff926e94b139fb7fcea229..cddf93a82bf669ed806fbb995ae92aa44cc75fa7 100644 (file)
@@ -1,4 +1,7 @@
 #!/usr/bin/perl -w
+#<<< format skipping of first code can cause an error message in perltidy v20210625
+my $rvar = [ [ 1, 2, 3 ], [ 4, 5, 6 ] ];
+#>>>
 sub length { return length( $_[0] ) }          # side comment
                                                # hanging side comment
  # very longgggggggggggggggggggggggggggggggggggggggggggggggggggg hanging side comment
index eecb8204a0ade445a451ef07ab55d9508f58d451..732a5d49092da572a38af1a4d5dd14b1d5a188b3 100644 (file)
@@ -1,5 +1,9 @@
 #!/usr/bin/perl -w
 # an initial hash bang line cannot be deleted with -dp
+#<<< format skipping of first code can cause an error message in perltidy v20210625
+my $rvar = [ [ 1, 2, 3 ], [ 4, 5, 6 ] ];
+
+#>>>
 sub length { return length( $_[0] ) }    # side comment
                                          # hanging side comment
  # very longgggggggggggggggggggggggggggggggggggggggggggggggggggg hanging side comment
index dee97983ef21626ec4d7ec6b45ee131571ce79c9..f6139ec1ae988530b233b6bf1ca92bad1b0e1d8e 100644 (file)
@@ -1,5 +1,8 @@
 #!/usr/bin/perl -w
 # an initial hash bang line cannot be deleted with -dp
+#<<< format skipping of first code can cause an error message in perltidy v20210625
+my $rvar = [ [ 1, 2, 3 ], [ 4, 5, 6 ] ];
+#>>>
 sub length { return length( $_[0] ) }    # side comment
                                          # hanging side comment
  # very longgggggggggggggggggggggggggggggggggggggggggggggggggggg hanging side comment
index 2b428bd2fa35d8f416ffb6445e173c88f063e69d..df9774d9ff20b52e9b43f6ed50e8de77d2c2166c 100644 (file)
@@ -1,5 +1,8 @@
 #!/usr/bin/perl -w
 # an initial hash bang line cannot be deleted with -dp
+#<<< format skipping of first code can cause an error message in perltidy v20210625
+my $rvar = [ [ 1, 2, 3 ], [ 4, 5, 6 ] ];
+#>>>
 sub length { return length( $_[0] ) }
 
 # a blank will be inserted to prevent forming a hanging side comment
index 431e492c1361321f46e822fb70d502a417b5bd72..4f2440e0e50087c65daf05e4216a773d40b269f4 100644 (file)
@@ -1,5 +1,8 @@
 #!/usr/bin/perl -w
 # an initial hash bang line cannot be deleted with -dp
+#<<< format skipping of first code can cause an error message in perltidy v20210625
+my $rvar = [ [ 1, 2, 3 ], [ 4, 5, 6 ] ];
+#>>>
 sub length { return length( $_[0] ) }    # side comment
                                          # hanging side comment
  # very longgggggggggggggggggggggggggggggggggggggggggggggggggggg hanging side comment
index 858a99f1cc5bca68e0e469be599290df0d4c83a9..e726bd4d086d533da5ff97c099c5df719e7c13c9 100644 (file)
@@ -90,6 +90,9 @@ ok IsWindow($c_sub_khwnd), 'IsWindow works on the client';
         'comments' => <<'----------',
 #!/usr/bin/perl -w
 # an initial hash bang line cannot be deleted with -dp
+#<<< format skipping of first code can cause an error message in perltidy v20210625
+my $rvar = [ [ 1, 2, 3 ], [ 4, 5, 6 ] ];
+#>>>
 sub length { return length($_[0]) }    # side comment
                              # hanging side comment
                              # very longgggggggggggggggggggggggggggggggggggggggggggggggggggg hanging side comment
@@ -341,6 +344,9 @@ ok IsWindow($c_sub_khwnd), 'IsWindow works on the client';
             expect => <<'#4...........',
 #!/usr/bin/perl -w
 # an initial hash bang line cannot be deleted with -dp
+#<<< format skipping of first code can cause an error message in perltidy v20210625
+my $rvar = [ [ 1, 2, 3 ], [ 4, 5, 6 ] ];
+#>>>
 sub length { return length( $_[0] ) }  # side comment
 
 # hanging side comment
@@ -431,6 +437,9 @@ Some pod after __END__ to delete with -dp and trim with -trp
             params => "comments2",
             expect => <<'#5...........',
 #!/usr/bin/perl -w
+#<<< format skipping of first code can cause an error message in perltidy v20210625
+my $rvar = [ [ 1, 2, 3 ], [ 4, 5, 6 ] ];
+#>>>
 sub length { return length( $_[0] ) }          # side comment
                                                # hanging side comment
  # very longgggggggggggggggggggggggggggggggggggggggggggggggggggg hanging side comment
@@ -497,6 +506,10 @@ __END__
             expect => <<'#6...........',
 #!/usr/bin/perl -w
 # an initial hash bang line cannot be deleted with -dp
+#<<< format skipping of first code can cause an error message in perltidy v20210625
+my $rvar = [ [ 1, 2, 3 ], [ 4, 5, 6 ] ];
+
+#>>>
 sub length { return length( $_[0] ) }    # side comment
                                          # hanging side comment
  # very longgggggggggggggggggggggggggggggggggggggggggggggggggggg hanging side comment
@@ -590,6 +603,9 @@ Some pod after __END__ to delete with -dp and trim with -trp
             expect => <<'#7...........',
 #!/usr/bin/perl -w
 # an initial hash bang line cannot be deleted with -dp
+#<<< format skipping of first code can cause an error message in perltidy v20210625
+my $rvar = [ [ 1, 2, 3 ], [ 4, 5, 6 ] ];
+#>>>
 sub length { return length( $_[0] ) }    # side comment
                                          # hanging side comment
  # very longgggggggggggggggggggggggggggggggggggggggggggggggggggg hanging side comment
@@ -692,6 +708,9 @@ Some pod after __END__ to delete with -dp and trim with -trp
             expect => <<'#8...........',
 #!/usr/bin/perl -w
 # an initial hash bang line cannot be deleted with -dp
+#<<< format skipping of first code can cause an error message in perltidy v20210625
+my $rvar = [ [ 1, 2, 3 ], [ 4, 5, 6 ] ];
+#>>>
 sub length { return length( $_[0] ) }    # side comment
                                          # hanging side comment
  # very longgggggggggggggggggggggggggggggggggggggggggggggggggggg hanging side comment
index 8a33351ae87c91fee896d7bfc382a1b66d839e10..67ca2647ab45b9fc710d1843759491ded97a8272 100644 (file)
@@ -119,6 +119,9 @@ catch {
         'comments' => <<'----------',
 #!/usr/bin/perl -w
 # an initial hash bang line cannot be deleted with -dp
+#<<< format skipping of first code can cause an error message in perltidy v20210625
+my $rvar = [ [ 1, 2, 3 ], [ 4, 5, 6 ] ];
+#>>>
 sub length { return length($_[0]) }    # side comment
                              # hanging side comment
                              # very longgggggggggggggggggggggggggggggggggggggggggggggggggggg hanging side comment
@@ -365,6 +368,9 @@ my ( $a, $b, $c ) = @_;    # test -nsak="my for"
             expect => <<'#4...........',
 #!/usr/bin/perl -w
 # an initial hash bang line cannot be deleted with -dp
+#<<< format skipping of first code can cause an error message in perltidy v20210625
+my $rvar = [ [ 1, 2, 3 ], [ 4, 5, 6 ] ];
+#>>>
 sub length { return length( $_[0] ) }
 
 # a blank will be inserted to prevent forming a hanging side comment