From: Steve Hancock Date: Mon, 15 Jul 2024 20:05:31 +0000 (-0700) Subject: fix test file names X-Git-Tag: 20240511.06~1 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b52c7c586f881d8cc81b6282bc66556218938351;p=perltidy.git fix test file names --- diff --git a/bin/perltidy b/bin/perltidy index 840f259a..2d7ac299 100755 --- a/bin/perltidy +++ b/bin/perltidy @@ -3794,7 +3794,7 @@ trailing commas but they are not required. Including them can sometimes simplify the maintenance of large or complex lists. By default, perltidy does not add or delete trailing commas, but it is possible to manipulate them with the -following set of three related parameters: +following set of related parameters: =over 4 @@ -3942,8 +3942,8 @@ B Adding or deleting the only comma in a list can have some implications which need to be explained and possibly controlled. -The main issue with deleting a lone comma is that if the only comma in a list -is deleted, then it might not be possible to later add it back automatically +The main issue with deleting a lone comma is that if it +is deleted, then it might not be possible add it back automatically since perltidy uses the existance of commas to help locate lists. For example, given @@ -3957,7 +3957,7 @@ and if we remove the comma with then we cannot use the trailing comma controls to add this comma back. The parameter B<--delete-lone-trailing-commas> allows such a comma to be deleted, and is on by default, but can be turned off to prevent this. This might -be useful is if one is experimenting with formatting options and wants +be useful if one is experimenting with formatting options and wants to restrict testing to operations which are reversible. Note that this parameter is a fine-tuning control for B<--delete-trailing-commas> which must also be set for it to have any effect. @@ -3975,12 +3975,11 @@ the following snippet: ); However, the parameter B<--add-lone-trailing-commas> must be set to allow such -a comma to be added. This parameter is off by default. The reason is that -adding such a comma would prevent the B<--weld-nested-containers> flag from -operating on this structure. This can be confusing, or undesirable if the -welding control is also being used. Note that this parameter is a fine-tuning -control for B<--add-trailing-commas> which must also be set for it to have any -effect. To illustrate its use: +a comma to be added. The reason is that adding such a comma would prevent the +B<--weld-nested-containers> flag from operating on this structure. This can be +confusing, so this parameter is off by default. Note that this parameter is a +fine-tuning control for B<--add-trailing-commas> which must also be set for it +to have any effect. To illustrate its use on the above example: # perltidy -atc -altc -wtc=b $self->make_grammar( @@ -3991,8 +3990,8 @@ effect. To illustrate its use: }, ); -If we later decide we would prefer to remove this comma to allow welding, -it can be removed with the control in the next section. +This comma can be removed to allow welding with the control described in the +next section. =item B<-dwic>, B<--delete-weld-interfering-commas> @@ -4010,7 +4009,7 @@ For example, a comma in this script prevents welding: }, ); -Using B<-dwic> removes the comma and allows welding: +Adding B<-dwic> removes the comma and allows welding: # perltidy -wn -dwic $self->make_grammar( { diff --git a/t/snippets/altc.in b/t/snippets/altc.in new file mode 100644 index 00000000..54255407 --- /dev/null +++ b/t/snippets/altc.in @@ -0,0 +1,7 @@ +$self->make_grammar( + { + iterator => $self->_iterator, + parser => $self, + version => $self->version + } +); diff --git a/t/snippets/altc1.par b/t/snippets/altc1.par new file mode 100644 index 00000000..e8ee09e2 --- /dev/null +++ b/t/snippets/altc1.par @@ -0,0 +1 @@ +-atc -wtc=m diff --git a/t/snippets/altc2.par b/t/snippets/altc2.par new file mode 100644 index 00000000..918e6ae5 --- /dev/null +++ b/t/snippets/altc2.par @@ -0,0 +1 @@ +-altc -atc -wtc=m diff --git a/t/snippets/atlc.in b/t/snippets/atlc.in deleted file mode 100644 index 54255407..00000000 --- a/t/snippets/atlc.in +++ /dev/null @@ -1,7 +0,0 @@ -$self->make_grammar( - { - iterator => $self->_iterator, - parser => $self, - version => $self->version - } -); diff --git a/t/snippets/atlc1.par b/t/snippets/atlc1.par deleted file mode 100644 index e8ee09e2..00000000 --- a/t/snippets/atlc1.par +++ /dev/null @@ -1 +0,0 @@ --atc -wtc=m diff --git a/t/snippets/atlc2.par b/t/snippets/atlc2.par deleted file mode 100644 index 918e6ae5..00000000 --- a/t/snippets/atlc2.par +++ /dev/null @@ -1 +0,0 @@ --altc -atc -wtc=m diff --git a/t/snippets/dltc.in b/t/snippets/dltc.in new file mode 100644 index 00000000..e2f77e2d --- /dev/null +++ b/t/snippets/dltc.in @@ -0,0 +1,7 @@ +$self->make_grammar( + { + iterator => $self->_iterator, + parser => $self, + version => $self->version, + }, +); diff --git a/t/snippets/dltc1.par b/t/snippets/dltc1.par new file mode 100644 index 00000000..247a5daf --- /dev/null +++ b/t/snippets/dltc1.par @@ -0,0 +1 @@ +-dtc -wtc=0 diff --git a/t/snippets/dltc2.par b/t/snippets/dltc2.par new file mode 100644 index 00000000..10e60c4b --- /dev/null +++ b/t/snippets/dltc2.par @@ -0,0 +1 @@ +-dtc -wtc=0 -ndltc diff --git a/t/snippets/dtlc.in b/t/snippets/dtlc.in deleted file mode 100644 index e2f77e2d..00000000 --- a/t/snippets/dtlc.in +++ /dev/null @@ -1,7 +0,0 @@ -$self->make_grammar( - { - iterator => $self->_iterator, - parser => $self, - version => $self->version, - }, -); diff --git a/t/snippets/dtlc1.par b/t/snippets/dtlc1.par deleted file mode 100644 index 247a5daf..00000000 --- a/t/snippets/dtlc1.par +++ /dev/null @@ -1 +0,0 @@ --dtc -wtc=0 diff --git a/t/snippets/dtlc2.par b/t/snippets/dtlc2.par deleted file mode 100644 index 10e60c4b..00000000 --- a/t/snippets/dtlc2.par +++ /dev/null @@ -1 +0,0 @@ --dtc -wtc=0 -ndltc diff --git a/t/snippets/expect/altc.altc1 b/t/snippets/expect/altc.altc1 new file mode 100644 index 00000000..c808a4b1 --- /dev/null +++ b/t/snippets/expect/altc.altc1 @@ -0,0 +1,7 @@ +$self->make_grammar( + { + iterator => $self->_iterator, + parser => $self, + version => $self->version, + } +); diff --git a/t/snippets/expect/altc.altc2 b/t/snippets/expect/altc.altc2 new file mode 100644 index 00000000..e2f77e2d --- /dev/null +++ b/t/snippets/expect/altc.altc2 @@ -0,0 +1,7 @@ +$self->make_grammar( + { + iterator => $self->_iterator, + parser => $self, + version => $self->version, + }, +); diff --git a/t/snippets/expect/altc.def b/t/snippets/expect/altc.def new file mode 100644 index 00000000..54255407 --- /dev/null +++ b/t/snippets/expect/altc.def @@ -0,0 +1,7 @@ +$self->make_grammar( + { + iterator => $self->_iterator, + parser => $self, + version => $self->version + } +); diff --git a/t/snippets/expect/atlc.atlc1 b/t/snippets/expect/atlc.atlc1 deleted file mode 100644 index c808a4b1..00000000 --- a/t/snippets/expect/atlc.atlc1 +++ /dev/null @@ -1,7 +0,0 @@ -$self->make_grammar( - { - iterator => $self->_iterator, - parser => $self, - version => $self->version, - } -); diff --git a/t/snippets/expect/atlc.atlc2 b/t/snippets/expect/atlc.atlc2 deleted file mode 100644 index e2f77e2d..00000000 --- a/t/snippets/expect/atlc.atlc2 +++ /dev/null @@ -1,7 +0,0 @@ -$self->make_grammar( - { - iterator => $self->_iterator, - parser => $self, - version => $self->version, - }, -); diff --git a/t/snippets/expect/atlc.def b/t/snippets/expect/atlc.def deleted file mode 100644 index 54255407..00000000 --- a/t/snippets/expect/atlc.def +++ /dev/null @@ -1,7 +0,0 @@ -$self->make_grammar( - { - iterator => $self->_iterator, - parser => $self, - version => $self->version - } -); diff --git a/t/snippets/expect/dltc.def b/t/snippets/expect/dltc.def new file mode 100644 index 00000000..e2f77e2d --- /dev/null +++ b/t/snippets/expect/dltc.def @@ -0,0 +1,7 @@ +$self->make_grammar( + { + iterator => $self->_iterator, + parser => $self, + version => $self->version, + }, +); diff --git a/t/snippets/expect/dltc.dltc1 b/t/snippets/expect/dltc.dltc1 new file mode 100644 index 00000000..54255407 --- /dev/null +++ b/t/snippets/expect/dltc.dltc1 @@ -0,0 +1,7 @@ +$self->make_grammar( + { + iterator => $self->_iterator, + parser => $self, + version => $self->version + } +); diff --git a/t/snippets/expect/dltc.dltc2 b/t/snippets/expect/dltc.dltc2 new file mode 100644 index 00000000..3fb66569 --- /dev/null +++ b/t/snippets/expect/dltc.dltc2 @@ -0,0 +1,7 @@ +$self->make_grammar( + { + iterator => $self->_iterator, + parser => $self, + version => $self->version + }, +); diff --git a/t/snippets/expect/dtlc.def b/t/snippets/expect/dtlc.def deleted file mode 100644 index e2f77e2d..00000000 --- a/t/snippets/expect/dtlc.def +++ /dev/null @@ -1,7 +0,0 @@ -$self->make_grammar( - { - iterator => $self->_iterator, - parser => $self, - version => $self->version, - }, -); diff --git a/t/snippets/expect/dtlc.dtlc1 b/t/snippets/expect/dtlc.dtlc1 deleted file mode 100644 index 54255407..00000000 --- a/t/snippets/expect/dtlc.dtlc1 +++ /dev/null @@ -1,7 +0,0 @@ -$self->make_grammar( - { - iterator => $self->_iterator, - parser => $self, - version => $self->version - } -); diff --git a/t/snippets/expect/dtlc.dtlc2 b/t/snippets/expect/dtlc.dtlc2 deleted file mode 100644 index 3fb66569..00000000 --- a/t/snippets/expect/dtlc.dtlc2 +++ /dev/null @@ -1,7 +0,0 @@ -$self->make_grammar( - { - iterator => $self->_iterator, - parser => $self, - version => $self->version - }, -); diff --git a/t/snippets/packing_list.txt b/t/snippets/packing_list.txt index bd32abd7..97d86f4c 100644 --- a/t/snippets/packing_list.txt +++ b/t/snippets/packing_list.txt @@ -444,14 +444,14 @@ ../snippets3.t gnu1.def ../snippets30.t git143.def ../snippets30.t git143.git143 -../snippets30.t atlc.atlc1 -../snippets30.t atlc.atlc2 -../snippets30.t atlc.def -../snippets30.t dtlc.def -../snippets30.t dtlc.dtlc1 -../snippets30.t dtlc.dtlc2 ../snippets30.t git146.def ../snippets30.t git146.git146 +../snippets30.t altc.altc1 +../snippets30.t altc.altc2 +../snippets30.t altc.def +../snippets30.t dltc.def +../snippets30.t dltc.dltc1 +../snippets30.t dltc.dltc2 ../snippets4.t gnu1.gnu ../snippets4.t gnu2.def ../snippets4.t gnu2.gnu diff --git a/t/snippets30.t b/t/snippets30.t index be08287c..35455a9c 100644 --- a/t/snippets30.t +++ b/t/snippets30.t @@ -3,14 +3,14 @@ # Contents: #1 git143.def #2 git143.git143 -#3 atlc.atlc1 -#4 atlc.atlc2 -#5 atlc.def -#6 dtlc.def -#7 dtlc.dtlc1 -#8 dtlc.dtlc2 -#9 git146.def -#10 git146.git146 +#3 git146.def +#4 git146.git146 +#5 altc.altc1 +#6 altc.altc2 +#7 altc.def +#8 dltc.def +#9 dltc.dltc1 +#10 dltc.dltc2 # To locate test #13 you can search for its name or the string '#13' @@ -28,11 +28,11 @@ BEGIN { # BEGIN SECTION 1: Parameter combinations # ########################################### $rparams = { - 'atlc1' => "-atc -wtc=m", - 'atlc2' => "-altc -atc -wtc=m", + 'altc1' => "-atc -wtc=m", + 'altc2' => "-altc -atc -wtc=m", 'def' => "", - 'dtlc1' => "-dtc -wtc=0", - 'dtlc2' => "-dtc -wtc=0 -ndltc", + 'dltc1' => "-dtc -wtc=0", + 'dltc2' => "-dtc -wtc=0 -ndltc", 'git143' => "-atc -wtc=h", 'git146' => <<'----------', # testing three dash parameters @@ -47,7 +47,7 @@ BEGIN { ############################ $rsources = { - 'atlc' => <<'----------', + 'altc' => <<'----------', $self->make_grammar( { iterator => $self->_iterator, @@ -57,7 +57,7 @@ $self->make_grammar( ); ---------- - 'dtlc' => <<'----------', + 'dltc' => <<'----------', $self->make_grammar( { iterator => $self->_iterator, @@ -120,51 +120,49 @@ $self->make_grammar( #2........... }, - 'atlc.atlc1' => { - source => "atlc", - params => "atlc1", + 'git146.def' => { + source => "git146", + params => "def", expect => <<'#3...........', -$self->make_grammar( - { - iterator => $self->_iterator, - parser => $self, - version => $self->version, - } -); + my %strips = ( + 1 => [ + [ [ 1750, 150, ], [ 1850, 150, ], ], + [ [ 1950, 150, ], [ 2050, 150, ], ], + ] + ); #3........... }, - 'atlc.atlc2' => { - source => "atlc", - params => "atlc2", + 'git146.git146' => { + source => "git146", + params => "git146", expect => <<'#4...........', -$self->make_grammar( - { - iterator => $self->_iterator, - parser => $self, - version => $self->version, - }, -); + my %strips = ( + 1 => [ + [ [ 1750, 150, ], [ 1850, 150, ], ], + [ [ 1950, 150, ], [ 2050, 150, ], ], + ], + ); #4........... }, - 'atlc.def' => { - source => "atlc", - params => "def", + 'altc.altc1' => { + source => "altc", + params => "altc1", expect => <<'#5...........', $self->make_grammar( { iterator => $self->_iterator, parser => $self, - version => $self->version + version => $self->version, } ); #5........... }, - 'dtlc.def' => { - source => "dtlc", - params => "def", + 'altc.altc2' => { + source => "altc", + params => "altc2", expect => <<'#6...........', $self->make_grammar( { @@ -176,9 +174,9 @@ $self->make_grammar( #6........... }, - 'dtlc.dtlc1' => { - source => "dtlc", - params => "dtlc1", + 'altc.def' => { + source => "altc", + params => "def", expect => <<'#7...........', $self->make_grammar( { @@ -190,43 +188,45 @@ $self->make_grammar( #7........... }, - 'dtlc.dtlc2' => { - source => "dtlc", - params => "dtlc2", + 'dltc.def' => { + source => "dltc", + params => "def", expect => <<'#8...........', $self->make_grammar( { iterator => $self->_iterator, parser => $self, - version => $self->version + version => $self->version, }, ); #8........... }, - 'git146.def' => { - source => "git146", - params => "def", + 'dltc.dltc1' => { + source => "dltc", + params => "dltc1", expect => <<'#9...........', - my %strips = ( - 1 => [ - [ [ 1750, 150, ], [ 1850, 150, ], ], - [ [ 1950, 150, ], [ 2050, 150, ], ], - ] - ); +$self->make_grammar( + { + iterator => $self->_iterator, + parser => $self, + version => $self->version + } +); #9........... }, - 'git146.git146' => { - source => "git146", - params => "git146", + 'dltc.dltc2' => { + source => "dltc", + params => "dltc2", expect => <<'#10...........', - my %strips = ( - 1 => [ - [ [ 1750, 150, ], [ 1850, 150, ], ], - [ [ 1950, 150, ], [ 2050, 150, ], ], - ], - ); +$self->make_grammar( + { + iterator => $self->_iterator, + parser => $self, + version => $self->version + }, +); #10........... }, };