]> git.donarmstrong.com Git - perltidy.git/commitdiff
added numerous test cases
authorSteve Hancock <perltidy@users.sourceforge.net>
Thu, 23 Apr 2020 13:59:40 +0000 (06:59 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Thu, 23 Apr 2020 13:59:40 +0000 (06:59 -0700)
25 files changed:
t/snippets/braces3.par
t/snippets/braces4.par [new file with mode: 0644]
t/snippets/braces5.par [new file with mode: 0644]
t/snippets/braces6.par [new file with mode: 0644]
t/snippets/coverage_missing.txt
t/snippets/coverage_values.txt
t/snippets/csc1.par
t/snippets/expect/braces.braces3
t/snippets/expect/braces.braces4 [new file with mode: 0644]
t/snippets/expect/braces.braces5 [new file with mode: 0644]
t/snippets/expect/braces.braces6 [new file with mode: 0644]
t/snippets/expect/csc.csc1
t/snippets/expect/scbb.def [new file with mode: 0644]
t/snippets/expect/scbb.scbb [new file with mode: 0644]
t/snippets/expect/space_paren.def [new file with mode: 0644]
t/snippets/expect/space_paren.space_paren1 [new file with mode: 0644]
t/snippets/expect/space_paren.space_paren2 [new file with mode: 0644]
t/snippets/packing_list.txt
t/snippets/scbb.in [new file with mode: 0644]
t/snippets/scbb.par [new file with mode: 0644]
t/snippets/space_paren.in [new file with mode: 0644]
t/snippets/space_paren1.par [new file with mode: 0644]
t/snippets/space_paren2.par [new file with mode: 0644]
t/snippets18.t
t/snippets19.t

index 3ee06bc13d6a6d9363f50443734e42c4bd0e1ac2..aa7373de0dbe20280b12f0fa4c8f516118dff665 100644 (file)
@@ -1 +1 @@
--bli
+-bli -bbvt=1
diff --git a/t/snippets/braces4.par b/t/snippets/braces4.par
new file mode 100644 (file)
index 0000000..d0f21a5
--- /dev/null
@@ -0,0 +1 @@
+-icb
diff --git a/t/snippets/braces5.par b/t/snippets/braces5.par
new file mode 100644 (file)
index 0000000..fcd131b
--- /dev/null
@@ -0,0 +1 @@
+-bli -blil='if'
diff --git a/t/snippets/braces6.par b/t/snippets/braces6.par
new file mode 100644 (file)
index 0000000..08942cc
--- /dev/null
@@ -0,0 +1 @@
+-ce
index a53b83fb28449fa923da8b18977d2003e4eb1822..7b344de3d2bf577e6a66d99dee96343451fe27e2 100644 (file)
@@ -4,7 +4,6 @@ assert-tidy
 assert-untidy
 backlink
 block-brace-vertical-tightness-list
-brace-left-and-indent-list
 break-at-old-attribute-breakpoints
 break-at-old-keyword-breakpoints
 break-at-old-logical-breakpoints
@@ -13,7 +12,6 @@ cachedir
 closing-side-comment-list
 closing-side-comment-prefix
 closing-side-comment-warnings
-closing-side-comments-balanced
 closing-token-indentation
 cuddled-block-list-exclusive
 dump-cuddled-block-list
@@ -97,7 +95,6 @@ html-src-extension
 html-table-of-contents
 html-toc-extension
 htmlroot
-indent-closing-brace
 keyword-group-blanks-list
 libpods
 logfile
@@ -130,10 +127,6 @@ preserve-line-endings
 profile
 quiet
 show-options
-space-after-keyword
-space-function-paren
-space-keyword-paren
-stack-closing-block-brace
 stack-opening-block-brace
 standard-output
 static-block-comment-prefix
index b44d86eec53cba6151362584b5a615c71bbfdc41..b907f75c49f3cd13bf9443b402337ab6becb858f 100644 (file)
 $VAR1 = {
-          'space-terminal-semicolon' => [
-                                          0,
-                                          1
-                                        ],
-          'format' => [
-                        'html',
-                        'tidy'
-                      ],
+          'line-up-parentheses' => [
+                                     0,
+                                     1
+                                   ],
+          'nowant-left-space' => [
+                                   '++ -- ?',
+                                   '..',
+                                   '= + - / *'
+                                 ],
+          'backup-file-extension' => [
+                                       'bak',
+                                       '~'
+                                     ],
+          'closing-side-comments-balanced' => [
+                                                0,
+                                                1
+                                              ],
+          'break-after-all-operators' => [
+                                           0,
+                                           1
+                                         ],
           'want-break-before' => [
                                    ' ',
                                    '% + - * / x != == >= <= =~ !~ < > | & = **= += *= &= <<= &&= -= /= |= >>= ||= //= .= %= ^= x=',
                                    '% + - * / x != == >= <= =~ < > | & **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x=',
                                    '='
                                  ],
-          'cuddled-break-option' => [
+          'one-line-block-nesting' => [
+                                        0,
+                                        1
+                                      ],
+          'fixed-position-side-comment' => [
+                                             40
+                                           ],
+          'delete-closing-side-comments' => [
+                                              0,
+                                              1
+                                            ],
+          'closing-side-comments' => [
+                                       0,
+                                       1
+                                     ],
+          'break-before-all-operators' => [
+                                            0,
+                                            1
+                                          ],
+          'blanks-before-blocks' => [
+                                      0,
                                       1
                                     ],
-          'keep-interior-semicolons' => [
-                                          0,
-                                          1
-                                        ],
-          'paren-vertical-tightness' => [
-                                          0,
-                                          1,
-                                          2
-                                        ],
+          'space-prototype-paren' => [
+                                       0,
+                                       1,
+                                       2
+                                     ],
+          'opening-sub-brace-on-new-line' => [
+                                               0,
+                                               1
+                                             ],
           'closing-paren-indentation' => [
                                            0,
                                            1,
                                            2
                                          ],
+          'square-bracket-vertical-tightness-closing' => [
+                                                           0,
+                                                           2
+                                                         ],
+          'indent-spaced-block-comments' => [
+                                              0,
+                                              1
+                                            ],
           'want-right-space' => [
                                   '= .= =~ !~ ? :'
                                 ],
-          'stack-closing-hash-brace' => [
-                                          0,
-                                          1
-                                        ],
-          'closing-brace-indentation' => [
+          'timestamp' => [
+                           0,
+                           1
+                         ],
+          'blank-lines-before-packages' => [
+                                             0,
+                                             1
+                                           ],
+          'closing-side-comment-maximum-text' => [
+                                                   20,
+                                                   40
+                                                 ],
+          'stack-closing-block-brace' => [
+                                           0,
+                                           1
+                                         ],
+          'one-line-block-semicolons' => [
                                            0,
                                            1,
                                            2
                                          ],
-          'block-brace-vertical-tightness' => [
-                                                0
-                                              ],
-          'brace-vertical-tightness-closing' => [
-                                                  0,
-                                                  2
-                                                ],
-          'stack-opening-paren' => [
-                                     0,
-                                     1
+          'break-at-old-method-breakpoints' => [
+                                                 0,
+                                                 1
+                                               ],
+          'entab-leading-whitespace' => [
+                                          8
+                                        ],
+          'space-backslash-quote' => [
+                                       0,
+                                       1,
+                                       2
+                                     ],
+          'static-block-comments' => [
+                                       0,
+                                       1
+                                     ],
+          'space-after-keyword' => [
+                                     'push'
                                    ],
-          'add-whitespace' => [
-                                0,
-                                1
-                              ],
-          'delete-semicolons' => [
-                                   0,
-                                   1
-                                 ],
-          'break-at-old-semicolon-breakpoints' => [
+          'nowant-right-space' => [
+                                    '++ --',
+                                    '..',
+                                    '= + - / *',
+                                    'A'
+                                  ],
+          'nospace-after-keyword' => [
+                                       'my for'
+                                     ],
+          'closing-square-bracket-indentation' => [
                                                     0,
-                                                    1
+                                                    1,
+                                                    2
                                                   ],
-          'continuation-indentation' => [
-                                          0,
-                                          2,
-                                          4
-                                        ],
+          'long-block-line-count' => [
+                                       8
+                                     ],
+          'iterations' => [
+                            1
+                          ],
+          'blank-lines-before-closing-block' => [
+                                                  1
+                                                ],
+          'format' => [
+                        'html',
+                        'tidy'
+                      ],
           'brace-left-and-indent' => [
                                        0,
                                        1
                                      ],
+          'opening-brace-on-new-line' => [
+                                           0,
+                                           1
+                                         ],
+          'outdent-keywords' => [
+                                  0,
+                                  1
+                                ],
+          'break-at-old-semicolon-breakpoints' => [
+                                                    0,
+                                                    1
+                                                  ],
+          'space-keyword-paren' => [
+                                     0,
+                                     1
+                                   ],
+          'default-tabsize' => [
+                                 8
+                               ],
           'square-bracket-vertical-tightness' => [
                                                    0,
                                                    1,
@@ -82,262 +172,277 @@ $VAR1 = {
           'closing-side-comment-else-flag' => [
                                                 0
                                               ],
-          'short-concatenation-item-length' => [
-                                                 12,
-                                                 8
-                                               ],
-          'break-before-all-operators' => [
-                                            0,
-                                            1
-                                          ],
-          'delete-block-comments' => [
-                                       0,
-                                       1
-                                     ],
-          'starting-indentation-level' => [
-                                            0
-                                          ],
-          'closing-side-comments' => [
-                                       0,
-                                       1
-                                     ],
-          'opening-paren-right' => [
+          'outdent-static-block-comments' => [
+                                               0,
+                                               1
+                                             ],
+          'stack-closing-square-bracket' => [
+                                              0,
+                                              1
+                                            ],
+          'delete-pod' => [
+                            0,
+                            1
+                          ],
+          'opening-hash-brace-right' => [
+                                          0,
+                                          1
+                                        ],
+          'closing-side-comment-interval' => [
+                                               2,
+                                               20,
+                                               6
+                                             ],
+          'delete-old-newlines' => [
                                      0,
                                      1
                                    ],
-          'blanks-before-comments' => [
-                                        0,
-                                        1
-                                      ],
-          'minimum-space-to-comment' => [
-                                          10,
-                                          2,
-                                          4
-                                        ],
-          'square-bracket-vertical-tightness-closing' => [
-                                                           0,
-                                                           2
-                                                         ],
-          'indent-block-comments' => [
+          'delete-block-comments' => [
                                        0,
                                        1
                                      ],
-          'break-at-old-method-breakpoints' => [
-                                                 0,
-                                                 1
-                                               ],
+          'keyword-group-blanks-size' => [
+                                           '5'
+                                         ],
+          'outdent-labels' => [
+                                0,
+                                1
+                              ],
+          'keyword-group-blanks-delete' => [
+                                             0,
+                                             1
+                                           ],
           'keep-old-blank-lines' => [
                                       0,
                                       1,
                                       2
                                     ],
-          'space-prototype-paren' => [
-                                       0,
-                                       1,
-                                       2
+          'brace-tightness' => [
+                                 0,
+                                 1,
+                                 2
+                               ],
+          'cuddled-else' => [
+                              0,
+                              1
+                            ],
+          'hanging-side-comments' => [
+                                       0,
+                                       1
                                      ],
-          'stack-opening-hash-brace' => [
+          'blank-lines-after-opening-block-list' => [
+                                                      '*'
+                                                    ],
+          'sub-alias-list' => [
+                                'method fun'
+                              ],
+          'comma-arrow-breakpoints' => [
+                                         1,
+                                         5
+                                       ],
+          'cuddled-break-option' => [
+                                      1
+                                    ],
+          'continuation-indentation' => [
                                           0,
-                                          1
+                                          2,
+                                          4
                                         ],
-          'keyword-group-blanks-inside' => [
-                                             0,
-                                             1
-                                           ],
-          'long-block-line-count' => [
-                                       8
-                                     ],
-          'blank-lines-before-subs' => [
-                                         0,
-                                         1
-                                       ],
-          'closing-side-comment-maximum-text' => [
-                                                   20,
-                                                   40
-                                                 ],
-          'one-line-block-nesting' => [
-                                        0,
-                                        1
-                                      ],
-          'outdent-labels' => [
+          'brace-vertical-tightness-closing' => [
+                                                  0,
+                                                  2
+                                                ],
+          'want-break-after' => [
+                                  '% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x= . << >> -> && ||'
+                                ],
+          'backup-and-modify-in-place' => [
+                                            0,
+                                            1
+                                          ],
+          'add-semicolons' => [
                                 0,
                                 1
                               ],
-          'opening-hash-brace-right' => [
-                                          0,
-                                          1
-                                        ],
-          'brace-vertical-tightness' => [
-                                          0,
-                                          1,
-                                          2
-                                        ],
-          'break-at-old-comma-breakpoints' => [
-                                                0,
-                                                1
-                                              ],
-          'blank-lines-after-opening-block' => [
-                                                 2
-                                               ],
-          'timestamp' => [
-                           0,
-                           1
-                         ],
-          'stack-opening-square-bracket' => [
+          'keyword-group-blanks-before' => [
+                                             1,
+                                             2
+                                           ],
+          'standard-error-output' => [
+                                       0,
+                                       1
+                                     ],
+          'opening-square-bracket-right' => [
                                               0,
                                               1
                                             ],
-          'blank-lines-before-closing-block' => [
-                                                  1
-                                                ],
-          'cuddled-else' => [
-                              0,
-                              1
-                            ],
-          'outdent-long-quotes' => [
+          'add-whitespace' => [
+                                0,
+                                1
+                              ],
+          'stack-opening-paren' => [
                                      0,
                                      1
                                    ],
-          'paren-vertical-tightness-closing' => [
-                                                  0,
-                                                  2
-                                                ],
-          'iterations' => [
-                            1
-                          ],
-          'delete-pod' => [
-                            0,
-                            1
-                          ],
-          'standard-error-output' => [
+          'delete-side-comments' => [
+                                      0,
+                                      1
+                                    ],
+          'keyword-group-blanks-inside' => [
+                                             0,
+                                             1
+                                           ],
+          'warning-output' => [
+                                0,
+                                1
+                              ],
+          'want-left-space' => [
+                                 '= .= =~ !~ :'
+                               ],
+          'maximum-fields-per-table' => [
+                                          0
+                                        ],
+          'indent-block-comments' => [
                                        0,
                                        1
                                      ],
+          'weld-nested-containers' => [
+                                        0,
+                                        1
+                                      ],
+          'block-brace-vertical-tightness' => [
+                                                0,
+                                                1
+                                              ],
+          'static-side-comments' => [
+                                      0,
+                                      1
+                                    ],
+          'ignore-old-breakpoints' => [
+                                        0,
+                                        1
+                                      ],
+          'short-concatenation-item-length' => [
+                                                 12,
+                                                 8
+                                               ],
           'space-for-semicolon' => [
                                      0,
                                      1
                                    ],
-          'warning-output' => [
-                                0,
-                                1
-                              ],
-          'one-line-block-semicolons' => [
+          'closing-brace-indentation' => [
                                            0,
                                            1,
                                            2
                                          ],
-          'sub-alias-list' => [
-                                'method fun'
-                              ],
-          'square-bracket-tightness' => [
-                                          0,
-                                          1,
-                                          2
-                                        ],
-          'variable-maximum-line-length' => [
-                                              0,
-                                              1
-                                            ],
-          'block-brace-tightness' => [
-                                       0,
-                                       1,
-                                       2
-                                     ],
-          'keyword-group-blanks-repeat-count' => [
-                                                   0
-                                                 ],
+          'blank-lines-after-opening-block' => [
+                                                 2
+                                               ],
           'opening-brace-always-on-right' => [
                                                0,
                                                1
                                              ],
-          'delete-side-comments' => [
-                                      0,
-                                      1
-                                    ],
-          'paren-tightness' => [
-                                 0,
-                                 1,
-                                 2
-                               ],
-          'static-side-comments' => [
-                                      0,
-                                      1
-                                    ],
-          'blank-lines-before-packages' => [
-                                             0,
-                                             1
-                                           ],
+          'recombine' => [
+                           0,
+                           1
+                         ],
           'indent-columns' => [
                                 0,
                                 2,
                                 4
                               ],
+          'opening-paren-right' => [
+                                     0,
+                                     1
+                                   ],
+          'stack-closing-paren' => [
+                                     0,
+                                     1
+                                   ],
+          'paren-tightness' => [
+                                 0,
+                                 1,
+                                 2
+                               ],
+          'variable-maximum-line-length' => [
+                                              0,
+                                              1
+                                            ],
+          'brace-vertical-tightness' => [
+                                          0,
+                                          1,
+                                          2
+                                        ],
+          'break-at-old-comma-breakpoints' => [
+                                                0,
+                                                1
+                                              ],
+          'character-encoding' => [
+                                    'guess'
+                                  ],
           'fuzzy-line-length' => [
                                    0,
                                    1
                                  ],
-          'blank-lines-after-opening-block-list' => [
-                                                      '*'
-                                                    ],
-          'entab-leading-whitespace' => [
-                                          8
-                                        ],
-          'add-newlines' => [
+          'blank-lines-before-closing-block-list' => [
+                                                       '*'
+                                                     ],
+          'check-syntax' => [
                               0,
                               1
                             ],
-          'hanging-side-comments' => [
+          'stack-closing-hash-brace' => [
+                                          0,
+                                          1
+                                        ],
+          'cuddled-block-list' => [
+                                    'map,sort,grep',
+                                    'sort,map,grep'
+                                  ],
+          'square-bracket-tightness' => [
+                                          0,
+                                          1,
+                                          2
+                                        ],
+          'block-brace-tightness' => [
                                        0,
-                                       1
+                                       1,
+                                       2
                                      ],
-          'stack-closing-square-bracket' => [
-                                              0,
-                                              1
-                                            ],
-          'fixed-position-side-comment' => [
-                                             40
+          'add-newlines' => [
+                              0,
+                              1
+                            ],
+          'space-terminal-semicolon' => [
+                                          0,
+                                          1
+                                        ],
+          'ignore-side-comment-lengths' => [
+                                             0,
+                                             1
                                            ],
-          'nospace-after-keyword' => [
-                                       'my for'
-                                     ],
-          'add-semicolons' => [
-                                0,
-                                1
-                              ],
-          'delete-closing-side-comments' => [
-                                              0,
-                                              1
-                                            ],
-          'want-left-space' => [
-                                 '= .= =~ !~ :'
-                               ],
-          'delete-old-newlines' => [
-                                     0,
-                                     1
-                                   ],
-          'weld-nested-containers' => [
+          'brace-left-and-indent-list' => [
+                                            'if'
+                                          ],
+          'tight-secret-operators' => [
                                         0,
                                         1
                                       ],
-          'maximum-fields-per-table' => [
-                                          0
+          'space-function-paren' => [
+                                      0,
+                                      1
+                                    ],
+          'keyword-group-blanks-after' => [
+                                            1,
+                                            2
+                                          ],
+          'stack-opening-hash-brace' => [
+                                          0,
+                                          1
                                         ],
-          'default-tabsize' => [
-                                 8
-                               ],
-          'backup-and-modify-in-place' => [
-                                            0,
-                                            1
+          'starting-indentation-level' => [
+                                            0
                                           ],
-          'closing-square-bracket-indentation' => [
-                                                    0,
-                                                    1,
-                                                    2
-                                                  ],
-          'character-encoding' => [
-                                    'guess'
-                                  ],
-          'static-block-comments' => [
+          'delete-old-whitespace' => [
                                        0,
                                        1
                                      ],
@@ -346,106 +451,38 @@ $VAR1 = {
                                                  1,
                                                  2
                                                ],
-          'break-after-all-operators' => [
-                                           0,
-                                           1
-                                         ],
-          'space-backslash-quote' => [
-                                       0,
-                                       1,
-                                       2
-                                     ],
-          'indent-spaced-block-comments' => [
-                                              0,
-                                              1
-                                            ],
-          'backup-file-extension' => [
-                                       'bak',
-                                       '~'
-                                     ],
-          'keyword-group-blanks-delete' => [
-                                             0,
-                                             1
-                                           ],
-          'opening-square-bracket-right' => [
-                                              0,
-                                              1
-                                            ],
-          'want-break-after' => [
-                                  '% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x= . << >> -> && ||'
-                                ],
-          'recombine' => [
-                           0,
-                           1
-                         ],
-          'comma-arrow-breakpoints' => [
-                                         1,
-                                         5
-                                       ],
-          'keyword-group-blanks-size' => [
-                                           '5'
-                                         ],
-          'brace-tightness' => [
-                                 0,
-                                 1,
-                                 2
-                               ],
-          'outdent-keywords' => [
-                                  0,
-                                  1
-                                ],
-          'nowant-left-space' => [
-                                   '++ -- ?',
-                                   '..',
-                                   '= + - / *'
-                                 ],
-          'opening-anonymous-sub-brace-on-new-line' => [
-                                                         0,
-                                                         1
-                                                       ],
-          'stack-closing-paren' => [
+          'outdent-long-quotes' => [
                                      0,
                                      1
                                    ],
-          'tight-secret-operators' => [
+          'blanks-before-comments' => [
                                         0,
                                         1
                                       ],
-          'ignore-side-comment-lengths' => [
-                                             0,
-                                             1
-                                           ],
-          'perl-syntax-check-flags' => [
-                                         '-c -T'
-                                       ],
-          'opening-brace-on-new-line' => [
-                                           0,
-                                           1
-                                         ],
-          'blanks-before-blocks' => [
-                                      0,
-                                      1
-                                    ],
-          'keyword-group-blanks-before' => [
-                                             1,
-                                             2
-                                           ],
-          'blank-lines-before-closing-block-list' => [
-                                                       '*'
-                                                     ],
-          'delete-old-whitespace' => [
+          'outdent-long-comments' => [
                                        0,
                                        1
                                      ],
-          'cuddled-block-list' => [
-                                    'map,sort,grep',
-                                    'sort,map,grep'
-                                  ],
-          'closing-side-comment-interval' => [
-                                               2,
-                                               20,
-                                               6
-                                             ],
+          'paren-vertical-tightness' => [
+                                          0,
+                                          1,
+                                          2
+                                        ],
+          'opening-anonymous-sub-brace-on-new-line' => [
+                                                         0,
+                                                         1
+                                                       ],
+          'keyword-group-blanks-repeat-count' => [
+                                                   0
+                                                 ],
+          'delete-semicolons' => [
+                                   0,
+                                   1
+                                 ],
+          'paren-vertical-tightness-closing' => [
+                                                  0,
+                                                  2
+                                                ],
           'maximum-line-length' => [
                                      0,
                                      1,
@@ -456,38 +493,28 @@ $VAR1 = {
                                      78,
                                      80
                                    ],
-          'ignore-old-breakpoints' => [
-                                        0,
-                                        1
-                                      ],
-          'check-syntax' => [
-                              0,
-                              1
-                            ],
-          'outdent-static-block-comments' => [
-                                               0,
-                                               1
-                                             ],
-          'keyword-group-blanks-after' => [
-                                            1,
-                                            2
-                                          ],
-          'line-up-parentheses' => [
-                                     0,
-                                     1
-                                   ],
-          'outdent-long-comments' => [
-                                       0,
-                                       1
-                                     ],
-          'nowant-right-space' => [
-                                    '++ --',
-                                    '..',
-                                    '= + - / *',
-                                    'A'
-                                  ],
-          'opening-sub-brace-on-new-line' => [
-                                               0,
-                                               1
-                                             ]
+          'perl-syntax-check-flags' => [
+                                         '-c -T'
+                                       ],
+          'indent-closing-brace' => [
+                                      0,
+                                      1
+                                    ],
+          'keep-interior-semicolons' => [
+                                          0,
+                                          1
+                                        ],
+          'minimum-space-to-comment' => [
+                                          10,
+                                          2,
+                                          4
+                                        ],
+          'blank-lines-before-subs' => [
+                                         0,
+                                         1
+                                       ],
+          'stack-opening-square-bracket' => [
+                                              0,
+                                              1
+                                            ]
         };
index f0f1921d81e2fc4a50f74a0d4bdece7a579def2e..19840cab62c079736475e9ad0af2b3ae9ec349fe 100644 (file)
@@ -1 +1 @@
--csc -csci=2 -cscb
+-csc -csci=2 -ncscb
index bbce26ff0ecadd7db0fcebf1e514311f3962e223..7e2286d57b67bb3735935be3ac9f95f427f4d4d1 100644 (file)
@@ -1,12 +1,9 @@
 sub message
-  {
-    if ( !defined( $_[0] ) )
-      {
-        print("Hello, World\n");
+  { if ( !defined( $_[0] ) )
+      { print("Hello, World\n");
       }
     else
-      {
-        print( $_[0], "\n" );
+      { print( $_[0], "\n" );
       }
   }
 
diff --git a/t/snippets/expect/braces.braces4 b/t/snippets/expect/braces.braces4
new file mode 100644 (file)
index 0000000..d6e3cb2
--- /dev/null
@@ -0,0 +1,12 @@
+sub message {
+    if ( !defined( $_[0] ) ) {
+        print("Hello, World\n");
+        }
+    else {
+        print( $_[0], "\n" );
+        }
+    }
+
+$myfun = sub {
+    print("Hello, World\n");
+    };
diff --git a/t/snippets/expect/braces.braces5 b/t/snippets/expect/braces.braces5
new file mode 100644 (file)
index 0000000..a384e8c
--- /dev/null
@@ -0,0 +1,15 @@
+sub message
+{
+    if ( !defined( $_[0] ) )
+      {
+        print("Hello, World\n");
+      }
+    else
+    {
+        print( $_[0], "\n" );
+    }
+}
+
+$myfun = sub {
+    print("Hello, World\n");
+};
diff --git a/t/snippets/expect/braces.braces6 b/t/snippets/expect/braces.braces6
new file mode 100644 (file)
index 0000000..f487681
--- /dev/null
@@ -0,0 +1,11 @@
+sub message {
+    if ( !defined( $_[0] ) ) {
+        print("Hello, World\n");
+    } else {
+        print( $_[0], "\n" );
+    }
+}
+
+$myfun = sub {
+    print("Hello, World\n");
+};
index e99b039472ecd36d0e59939f95b23cbe07665dfd..6a0fe7b755d386294d60f0cf8303161fd54dc087 100644 (file)
@@ -4,5 +4,5 @@
             } ## end if ( !defined( $_[0] ))
             else {
                 print( $_[0], "\n" );
-            } ## end else [ if ( !defined( $_[0] ))]
+            } ## end else [ if ( !defined( $_[0] ))
         } ## end sub message
diff --git a/t/snippets/expect/scbb.def b/t/snippets/expect/scbb.def
new file mode 100644 (file)
index 0000000..9aa1861
--- /dev/null
@@ -0,0 +1,11 @@
+    # test -scbb:
+    for $w1 (@w1) {
+        for $w2 (@w2) {
+            for $w3 (@w3) {
+                for $w4 (@w4) {
+                    push( @lines, "$w1 $w2 $w3 $w4\n" );
+                }
+            }
+        }
+    }
+
diff --git a/t/snippets/expect/scbb.scbb b/t/snippets/expect/scbb.scbb
new file mode 100644 (file)
index 0000000..41b7c79
--- /dev/null
@@ -0,0 +1,8 @@
+    # test -scbb:
+    for $w1 (@w1) {
+        for $w2 (@w2) {
+            for $w3 (@w3) {
+                for $w4 (@w4) {
+                    push( @lines, "$w1 $w2 $w3 $w4\n" );
+                } } } }
+
diff --git a/t/snippets/expect/space_paren.def b/t/snippets/expect/space_paren.def
new file mode 100644 (file)
index 0000000..a7083ff
--- /dev/null
@@ -0,0 +1,4 @@
+myfunc( $a, $b, $c );    # test -sfp
+push( @array, $val );    # test -skp and also -sak='push'
+split( /\|/, $txt );     # test -skp and also -sak='push'
+my ( $v1, $v2 ) = @_;    # test -sak='push'
diff --git a/t/snippets/expect/space_paren.space_paren1 b/t/snippets/expect/space_paren.space_paren1
new file mode 100644 (file)
index 0000000..371dcba
--- /dev/null
@@ -0,0 +1,4 @@
+myfunc ( $a, $b, $c );    # test -sfp
+push ( @array, $val );    # test -skp and also -sak='push'
+split ( /\|/, $txt );     # test -skp and also -sak='push'
+my ( $v1, $v2 ) = @_;     # test -sak='push'
diff --git a/t/snippets/expect/space_paren.space_paren2 b/t/snippets/expect/space_paren.space_paren2
new file mode 100644 (file)
index 0000000..052af7c
--- /dev/null
@@ -0,0 +1,4 @@
+myfunc( $a, $b, $c );     # test -sfp
+push ( @array, $val );    # test -skp and also -sak='push'
+split( /\|/, $txt );      # test -skp and also -sak='push'
+my ( $v1, $v2 ) = @_;     # test -sak='push'
index 87fc4ae722b752b2572b54ec33e9a63f2607d4bc..d430b89bb1fe83c25c88398c50383a2eefc7548b 100644 (file)
 ../snippets18.t        wn8.def
 ../snippets18.t        wn8.wn
 ../snippets18.t        comments.comments5
+../snippets18.t        braces.braces1
+../snippets18.t        braces.braces2
+../snippets18.t        braces.braces3
+../snippets18.t        braces.def
+../snippets18.t        csc.csc1
+../snippets18.t        csc.csc2
+../snippets18.t        csc.def
+../snippets18.t        iob.def
+../snippets18.t        iob.iob
+../snippets18.t        kis.def
+../snippets18.t        kis.kis
+../snippets18.t        maths.def
+../snippets18.t        maths.maths1
+../snippets18.t        maths.maths2
+../snippets18.t        misc_tests.def
+../snippets19.t        misc_tests.misc_tests
+../snippets19.t        outdent.def
+../snippets19.t        outdent.outdent1
+../snippets19.t        sbq.def
+../snippets19.t        sbq.sbq0
+../snippets19.t        sbq.sbq2
+../snippets19.t        tightness.def
+../snippets19.t        tightness.tightness1
+../snippets19.t        tightness.tightness2
+../snippets19.t        tightness.tightness3
+../snippets19.t        braces.braces4
+../snippets19.t        scbb.def
+../snippets19.t        scbb.scbb
+../snippets19.t        space_paren.def
+../snippets19.t        space_paren.space_paren1
+../snippets19.t        space_paren.space_paren2
+../snippets19.t        braces.braces5
 ../snippets2.t angle.def
 ../snippets2.t arrows1.def
 ../snippets2.t arrows2.def
 ../snippets9.t rt98902.def
 ../snippets9.t rt98902.rt98902
 ../snippets9.t rt99961.def
-../snippets18.t        braces.braces1
-../snippets18.t        braces.braces2
-../snippets18.t        braces.braces3
-../snippets18.t        braces.def
-../snippets18.t        csc.csc1
-../snippets18.t        csc.csc2
-../snippets18.t        csc.def
-../snippets18.t        iob.def
-../snippets18.t        iob.iob
-../snippets18.t        kis.def
-../snippets18.t        kis.kis
-../snippets18.t        maths.def
-../snippets18.t        maths.maths1
-../snippets18.t        maths.maths2
-../snippets18.t        misc_tests.def
-../snippets19.t        misc_tests.misc_tests
-../snippets19.t        outdent.def
-../snippets19.t        outdent.outdent1
-../snippets19.t        sbq.def
-../snippets19.t        sbq.sbq0
-../snippets19.t        sbq.sbq2
-../snippets19.t        tightness.def
-../snippets19.t        tightness.tightness1
-../snippets19.t        tightness.tightness2
-../snippets19.t        tightness.tightness3
+../snippets19.t        braces.braces6
diff --git a/t/snippets/scbb.in b/t/snippets/scbb.in
new file mode 100644 (file)
index 0000000..9aa1861
--- /dev/null
@@ -0,0 +1,11 @@
+    # test -scbb:
+    for $w1 (@w1) {
+        for $w2 (@w2) {
+            for $w3 (@w3) {
+                for $w4 (@w4) {
+                    push( @lines, "$w1 $w2 $w3 $w4\n" );
+                }
+            }
+        }
+    }
+
diff --git a/t/snippets/scbb.par b/t/snippets/scbb.par
new file mode 100644 (file)
index 0000000..02b8126
--- /dev/null
@@ -0,0 +1 @@
+-scbb
diff --git a/t/snippets/space_paren.in b/t/snippets/space_paren.in
new file mode 100644 (file)
index 0000000..c807602
--- /dev/null
@@ -0,0 +1,4 @@
+myfunc ( $a, $b, $c );    # test -sfp
+push ( @array, $val );    # test -skp and also -sak='push'
+split( /\|/, $txt );      # test -skp and also -sak='push'
+my ( $v1, $v2 ) = @_;     # test -sak='push'
diff --git a/t/snippets/space_paren1.par b/t/snippets/space_paren1.par
new file mode 100644 (file)
index 0000000..8fd2416
--- /dev/null
@@ -0,0 +1 @@
+-sfp -skp
diff --git a/t/snippets/space_paren2.par b/t/snippets/space_paren2.par
new file mode 100644 (file)
index 0000000..0f24224
--- /dev/null
@@ -0,0 +1 @@
+-sak=push
index 89f78edfe8d594cde8084ba44b4595cd58b988ad..6a4e28ca7c2351d19351b60f9e617c51f3971233 100644 (file)
@@ -39,9 +39,9 @@ BEGIN {
     $rparams = {
         'braces1'   => "-bl -asbl",
         'braces2'   => "-sbl",
-        'braces3'   => "-bli",
+        'braces3'   => "-bli -bbvt=1",
         'comments5' => "-dsc -nsbc",
-        'csc1'      => "-csc -csci=2 -cscb",
+        'csc1'      => "-csc -csci=2 -ncscb",
         'csc2'      => "-dcsc",
         'def'       => "",
         'iob'       => "-iob",
@@ -430,14 +430,11 @@ $myfun = sub {
             params => "braces3",
             expect => <<'#7...........',
 sub message
-  {
-    if ( !defined( $_[0] ) )
-      {
-        print("Hello, World\n");
+  { if ( !defined( $_[0] ) )
+      { print("Hello, World\n");
       }
     else
-      {
-        print( $_[0], "\n" );
+      { print( $_[0], "\n" );
       }
   }
 
@@ -476,7 +473,7 @@ $myfun = sub {
             } ## end if ( !defined( $_[0] ))
             else {
                 print( $_[0], "\n" );
-            } ## end else [ if ( !defined( $_[0] ))]
+            } ## end else [ if ( !defined( $_[0] ))
         } ## end sub message
 #9...........
         },
index 38f229a558306eaadd8edde7f29266c80f8f2153..ff871345dfe87e61a97df55aba29f8d3eb5cc925 100644 (file)
 #8 tightness.tightness1
 #9 tightness.tightness2
 #10 tightness.tightness3
+#11 braces.braces4
+#12 scbb.def
+#13 scbb.scbb
+#14 space_paren.def
+#15 space_paren.space_paren1
+#16 space_paren.space_paren2
+#17 braces.braces5
+#18 braces.braces6
 
 # To locate test #13 you can search for its name or the string '#13'
 
@@ -28,15 +36,23 @@ BEGIN {
     # BEGIN SECTION 1: Parameter combinations #
     ###########################################
     $rparams = {
+        'braces4' => "-icb",
+        'braces5' => <<'----------',
+-bli -blil='if'
+----------
+        'braces6'    => "-ce",
         'def'        => "",
         'misc_tests' => <<'----------',
 -sts -ssc -sfs -nsak="my for" -ndsm
 ----------
-        'outdent1'   => "-nola -okw",
-        'sbq0'       => "-sbq=0",
-        'sbq2'       => "-sbq=2",
-        'tightness1' => "-pt=0 -sbt=0 -bt=0 -bbt=0",
-        'tightness2' => <<'----------',
+        'outdent1'     => "-nola -okw",
+        'sbq0'         => "-sbq=0",
+        'sbq2'         => "-sbq=2",
+        'scbb'         => "-scbb",
+        'space_paren1' => "-sfp -skp",
+        'space_paren2' => "-sak=push",
+        'tightness1'   => "-pt=0 -sbt=0 -bt=0 -bbt=0",
+        'tightness2'   => <<'----------',
 -pt=1 -sbt=1 -bt=1 -bbt=1
 
 ----------
@@ -51,6 +67,21 @@ BEGIN {
     ############################
     $rsources = {
 
+        'braces' => <<'----------',
+sub message {
+    if ( !defined( $_[0] ) ) {
+        print("Hello, World\n");
+    }
+    else {
+        print( $_[0], "\n" );
+    }
+}
+
+$myfun = sub {
+    print("Hello, World\n");
+};
+----------
+
         'misc_tests' => <<'----------',
 for ( @a = @$ap, $u = shift @a; @a; $u = $v ) { ... } # test -sfs 
 $i = 1 ;     #  test -sts
@@ -75,6 +106,27 @@ my ( $a, $b, $c ) = @_;    # test -nsak="my for"
        $str2=\ 'string2';
 ----------
 
+        'scbb' => <<'----------',
+    # test -scbb:
+    for $w1 (@w1) {
+        for $w2 (@w2) {
+            for $w3 (@w3) {
+                for $w4 (@w4) {
+                    push( @lines, "$w1 $w2 $w3 $w4\n" );
+                }
+            }
+        }
+    }
+
+----------
+
+        'space_paren' => <<'----------',
+myfunc ( $a, $b, $c );    # test -sfp
+push ( @array, $val );    # test -skp and also -sak='push'
+split( /\|/, $txt );      # test -skp and also -sak='push'
+my ( $v1, $v2 ) = @_;     # test -sak='push'
+----------
+
         'tightness' => <<'----------',
 if (( my $len_tab = length( $tabstr )  ) > 0) {  }  # test -pt
 $width = $col[ $j + $k ] - $col[ $j ]; # test -sbt
@@ -203,6 +255,131 @@ $obj->{$parsed_sql->{'table'}[0]};              # test -bt
 %bf = map {$_ => -M $_} grep {/\.deb$/} dirents '.';    # test -bbt
 #10...........
         },
+
+        'braces.braces4' => {
+            source => "braces",
+            params => "braces4",
+            expect => <<'#11...........',
+sub message {
+    if ( !defined( $_[0] ) ) {
+        print("Hello, World\n");
+        }
+    else {
+        print( $_[0], "\n" );
+        }
+    }
+
+$myfun = sub {
+    print("Hello, World\n");
+    };
+#11...........
+        },
+
+        'scbb.def' => {
+            source => "scbb",
+            params => "def",
+            expect => <<'#12...........',
+    # test -scbb:
+    for $w1 (@w1) {
+        for $w2 (@w2) {
+            for $w3 (@w3) {
+                for $w4 (@w4) {
+                    push( @lines, "$w1 $w2 $w3 $w4\n" );
+                }
+            }
+        }
+    }
+
+#12...........
+        },
+
+        'scbb.scbb' => {
+            source => "scbb",
+            params => "scbb",
+            expect => <<'#13...........',
+    # test -scbb:
+    for $w1 (@w1) {
+        for $w2 (@w2) {
+            for $w3 (@w3) {
+                for $w4 (@w4) {
+                    push( @lines, "$w1 $w2 $w3 $w4\n" );
+                } } } }
+
+#13...........
+        },
+
+        'space_paren.def' => {
+            source => "space_paren",
+            params => "def",
+            expect => <<'#14...........',
+myfunc( $a, $b, $c );    # test -sfp
+push( @array, $val );    # test -skp and also -sak='push'
+split( /\|/, $txt );     # test -skp and also -sak='push'
+my ( $v1, $v2 ) = @_;    # test -sak='push'
+#14...........
+        },
+
+        'space_paren.space_paren1' => {
+            source => "space_paren",
+            params => "space_paren1",
+            expect => <<'#15...........',
+myfunc ( $a, $b, $c );    # test -sfp
+push ( @array, $val );    # test -skp and also -sak='push'
+split ( /\|/, $txt );     # test -skp and also -sak='push'
+my ( $v1, $v2 ) = @_;     # test -sak='push'
+#15...........
+        },
+
+        'space_paren.space_paren2' => {
+            source => "space_paren",
+            params => "space_paren2",
+            expect => <<'#16...........',
+myfunc( $a, $b, $c );     # test -sfp
+push ( @array, $val );    # test -skp and also -sak='push'
+split( /\|/, $txt );      # test -skp and also -sak='push'
+my ( $v1, $v2 ) = @_;     # test -sak='push'
+#16...........
+        },
+
+        'braces.braces5' => {
+            source => "braces",
+            params => "braces5",
+            expect => <<'#17...........',
+sub message
+{
+    if ( !defined( $_[0] ) )
+      {
+        print("Hello, World\n");
+      }
+    else
+    {
+        print( $_[0], "\n" );
+    }
+}
+
+$myfun = sub {
+    print("Hello, World\n");
+};
+#17...........
+        },
+
+        'braces.braces6' => {
+            source => "braces",
+            params => "braces6",
+            expect => <<'#18...........',
+sub message {
+    if ( !defined( $_[0] ) ) {
+        print("Hello, World\n");
+    } else {
+        print( $_[0], "\n" );
+    }
+}
+
+$myfun = sub {
+    print("Hello, World\n");
+};
+#18...........
+        },
     };
 
     my $ntests = 0 + keys %{$rtests};