From: Steve Hancock Date: Mon, 24 Dec 2018 02:43:10 +0000 (-0800) Subject: added test for -kgbd flag X-Git-Tag: 20190601~36 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=bb1fa34098186a4d99ca92098621fff18b50cfb6;p=perltidy.git added test for -kgbd flag --- diff --git a/t/snippets/expect/kgbd.def b/t/snippets/expect/kgbd.def new file mode 100644 index 00000000..83325acf --- /dev/null +++ b/t/snippets/expect/kgbd.def @@ -0,0 +1,14 @@ +package A1::B2; + +use strict; + +require Exporter; +use A1::Context; + +use A1::Database; +use A1::Bibliotek; +use A1::Author; +use A1::Title; + +use vars qw($VERSION @ISA @EXPORT); +$VERSION = 0.01; diff --git a/t/snippets/expect/kgbd.kgbd b/t/snippets/expect/kgbd.kgbd new file mode 100644 index 00000000..97b389c4 --- /dev/null +++ b/t/snippets/expect/kgbd.kgbd @@ -0,0 +1,13 @@ +package A1::B2; + +use strict; +require Exporter; + +use A1::Context; +use A1::Database; +use A1::Bibliotek; +use A1::Author; +use A1::Title; +use vars qw($VERSION @ISA @EXPORT); + +$VERSION = 0.01; diff --git a/t/snippets/kgbd.in b/t/snippets/kgbd.in new file mode 100644 index 00000000..83325acf --- /dev/null +++ b/t/snippets/kgbd.in @@ -0,0 +1,14 @@ +package A1::B2; + +use strict; + +require Exporter; +use A1::Context; + +use A1::Database; +use A1::Bibliotek; +use A1::Author; +use A1::Title; + +use vars qw($VERSION @ISA @EXPORT); +$VERSION = 0.01; diff --git a/t/snippets/kgbd.par b/t/snippets/kgbd.par new file mode 100644 index 00000000..76a58186 --- /dev/null +++ b/t/snippets/kgbd.par @@ -0,0 +1 @@ +-kgbd -kgb diff --git a/t/snippets/packing_list.txt b/t/snippets/packing_list.txt index 67b47428..225f2fd1 100644 --- a/t/snippets/packing_list.txt +++ b/t/snippets/packing_list.txt @@ -273,3 +273,5 @@ ../snippets9.t rt98902.def ../snippets9.t rt98902.rt98902 ../snippets9.t rt99961.def +../snippets14.t kgbd.def +../snippets14.t kgbd.kgbd diff --git a/t/snippets14.t b/t/snippets14.t index 2cc3b4cb..4965d32b 100644 --- a/t/snippets14.t +++ b/t/snippets14.t @@ -16,6 +16,8 @@ #13 kgb4.kgb #14 kgb5.def #15 kgb5.kgb +#16 kgbd.def +#17 kgbd.kgbd # To locate test #13 you can search for its name or the string '#13' @@ -33,8 +35,9 @@ BEGIN { # BEGIN SECTION 1: Parameter combinations # ########################################### $rparams = { - 'def' => "", - 'kgb' => "-kgb", + 'def' => "", + 'kgb' => "-kgb", + 'kgbd' => "-kgbd -kgb", }; ############################ @@ -261,6 +264,23 @@ my $result = : "-A"; my $F = "0"; print "with -kgb, put blank above this line; result=$result\n"; +---------- + + 'kgbd' => <<'----------', +package A1::B2; + +use strict; + +require Exporter; +use A1::Context; + +use A1::Database; +use A1::Bibliotek; +use A1::Author; +use A1::Title; + +use vars qw($VERSION @ISA @EXPORT); +$VERSION = 0.01; ---------- 'ternary3' => <<'----------', @@ -761,6 +781,47 @@ my $F = "0"; print "with -kgb, put blank above this line; result=$result\n"; #15........... }, + + 'kgbd.def' => { + source => "kgbd", + params => "def", + expect => <<'#16...........', +package A1::B2; + +use strict; + +require Exporter; +use A1::Context; + +use A1::Database; +use A1::Bibliotek; +use A1::Author; +use A1::Title; + +use vars qw($VERSION @ISA @EXPORT); +$VERSION = 0.01; +#16........... + }, + + 'kgbd.kgbd' => { + source => "kgbd", + params => "kgbd", + expect => <<'#17...........', +package A1::B2; + +use strict; +require Exporter; + +use A1::Context; +use A1::Database; +use A1::Bibliotek; +use A1::Author; +use A1::Title; +use vars qw($VERSION @ISA @EXPORT); + +$VERSION = 0.01; +#17........... + }, }; my $ntests = 0 + keys %{$rtests};