From: Steve Hancock Date: Mon, 4 May 2020 14:46:19 +0000 (-0700) Subject: switch to Test::More X-Git-Tag: 20200619~46 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=35c65f43712f770ff4f4a3924a191264cf32e890;p=perltidy.git switch to Test::More --- diff --git a/t/snippets/expect/spp.def b/t/snippets/expect/spp.def index 4b8e38c6..9e8da408 100644 --- a/t/snippets/expect/spp.def +++ b/t/snippets/expect/spp.def @@ -3,3 +3,5 @@ sub get_val() { } sub get_Val () { } sub Get_val () { } +my $sub1 = sub () { }; +my $sub2 = sub () { }; diff --git a/t/snippets/expect/spp.spp0 b/t/snippets/expect/spp.spp0 index f663642f..821616b6 100644 --- a/t/snippets/expect/spp.spp0 +++ b/t/snippets/expect/spp.spp0 @@ -3,3 +3,5 @@ sub get_val() { } sub get_Val() { } sub Get_val() { } +my $sub1 = sub() { }; +my $sub2 = sub() { }; diff --git a/t/snippets/expect/spp.spp1 b/t/snippets/expect/spp.spp1 index 4b8e38c6..9e8da408 100644 --- a/t/snippets/expect/spp.spp1 +++ b/t/snippets/expect/spp.spp1 @@ -3,3 +3,5 @@ sub get_val() { } sub get_Val () { } sub Get_val () { } +my $sub1 = sub () { }; +my $sub2 = sub () { }; diff --git a/t/snippets/expect/spp.spp2 b/t/snippets/expect/spp.spp2 index 7cd649c9..4fb5032a 100644 --- a/t/snippets/expect/spp.spp2 +++ b/t/snippets/expect/spp.spp2 @@ -3,3 +3,5 @@ sub get_val () { } sub get_Val () { } sub Get_val () { } +my $sub1 = sub () { }; +my $sub2 = sub () { }; diff --git a/t/snippets/make_t.pl b/t/snippets/make_t.pl index 56d65587..78a27c51 100755 --- a/t/snippets/make_t.pl +++ b/t/snippets/make_t.pl @@ -283,7 +283,7 @@ $ename_string EOM $script .= <<'EOM'; use strict; -use Test; +use Test::More; use Carp; use Perl::Tidy; my $rparams; @@ -428,7 +428,7 @@ foreach my $key ( sort keys %{$rtests} ) { } } else { - ok( $output, $expect ); + is( $output, $expect, "$sname.$pname" ); } } EOM diff --git a/t/snippets/packing_list.txt b/t/snippets/packing_list.txt index 913908c5..7a99d59c 100644 --- a/t/snippets/packing_list.txt +++ b/t/snippets/packing_list.txt @@ -232,6 +232,8 @@ ../snippets2.t carat.def ../snippets2.t ce1.ce ../snippets2.t ce1.def +../snippets20.t space6.def +../snippets20.t space6.space6 ../snippets3.t ce_wn1.ce_wn ../snippets3.t ce_wn1.def ../snippets3.t colin.colin @@ -372,5 +374,3 @@ ../snippets9.t rt98902.def ../snippets9.t rt98902.rt98902 ../snippets9.t rt99961.def -../snippets20.t space6.def -../snippets20.t space6.space6 diff --git a/t/snippets1.t b/t/snippets1.t index 68927e32..b18edac3 100644 --- a/t/snippets1.t +++ b/t/snippets1.t @@ -25,7 +25,7 @@ # To locate test #13 you can search for its name or the string '#13' use strict; -use Test; +use Test::More; use Carp; use Perl::Tidy; my $rparams; @@ -560,6 +560,6 @@ foreach my $key ( sort keys %{$rtests} ) { } } else { - ok( $output, $expect ); + is( $output, $expect, "$sname.$pname" ); } } diff --git a/t/snippets10.t b/t/snippets10.t index 2bda303f..944ffde5 100644 --- a/t/snippets10.t +++ b/t/snippets10.t @@ -25,7 +25,7 @@ # To locate test #13 you can search for its name or the string '#13' use strict; -use Test; +use Test::More; use Carp; use Perl::Tidy; my $rparams; @@ -1034,6 +1034,6 @@ foreach my $key ( sort keys %{$rtests} ) { } } else { - ok( $output, $expect ); + is( $output, $expect, "$sname.$pname" ); } } diff --git a/t/snippets11.t b/t/snippets11.t index 0878f4fd..edf75508 100644 --- a/t/snippets11.t +++ b/t/snippets11.t @@ -25,7 +25,7 @@ # To locate test #13 you can search for its name or the string '#13' use strict; -use Test; +use Test::More; use Carp; use Perl::Tidy; my $rparams; @@ -599,6 +599,6 @@ foreach my $key ( sort keys %{$rtests} ) { } } else { - ok( $output, $expect ); + is( $output, $expect, "$sname.$pname" ); } } diff --git a/t/snippets12.t b/t/snippets12.t index 9b0332a1..e35da614 100644 --- a/t/snippets12.t +++ b/t/snippets12.t @@ -25,7 +25,7 @@ # To locate test #13 you can search for its name or the string '#13' use strict; -use Test; +use Test::More; use Carp; use Perl::Tidy; my $rparams; @@ -613,6 +613,6 @@ foreach my $key ( sort keys %{$rtests} ) { } } else { - ok( $output, $expect ); + is( $output, $expect, "$sname.$pname" ); } } diff --git a/t/snippets13.t b/t/snippets13.t index 8d7bccdc..67bd8e0c 100644 --- a/t/snippets13.t +++ b/t/snippets13.t @@ -24,7 +24,7 @@ # To locate test #13 you can search for its name or the string '#13' use strict; -use Test; +use Test::More; use Carp; use Perl::Tidy; my $rparams; @@ -473,6 +473,6 @@ foreach my $key ( sort keys %{$rtests} ) { } } else { - ok( $output, $expect ); + is( $output, $expect, "$sname.$pname" ); } } diff --git a/t/snippets14.t b/t/snippets14.t index b98162d9..731f0bbe 100644 --- a/t/snippets14.t +++ b/t/snippets14.t @@ -24,7 +24,7 @@ # To locate test #13 you can search for its name or the string '#13' use strict; -use Test; +use Test::More; use Carp; use Perl::Tidy; my $rparams; @@ -1080,6 +1080,6 @@ foreach my $key ( sort keys %{$rtests} ) { } } else { - ok( $output, $expect ); + is( $output, $expect, "$sname.$pname" ); } } diff --git a/t/snippets15.t b/t/snippets15.t index affba1b7..76dae13d 100644 --- a/t/snippets15.t +++ b/t/snippets15.t @@ -24,7 +24,7 @@ # To locate test #13 you can search for its name or the string '#13' use strict; -use Test; +use Test::More; use Carp; use Perl::Tidy; my $rparams; @@ -171,6 +171,8 @@ sub get_val() { } sub get_Val () { } sub Get_val () { } +my $sub1=sub () { }; +my $sub2=sub () { }; ---------- 'wngnu1' => <<'----------', @@ -470,6 +472,8 @@ sub get_val() { } sub get_Val () { } sub Get_val () { } +my $sub1 = sub () { }; +my $sub2 = sub () { }; #18........... }, @@ -482,6 +486,8 @@ sub get_val() { } sub get_Val() { } sub Get_val() { } +my $sub1 = sub() { }; +my $sub2 = sub() { }; #19........... }, }; @@ -535,6 +541,6 @@ foreach my $key ( sort keys %{$rtests} ) { } } else { - ok( $output, $expect ); + is( $output, $expect, "$sname.$pname" ); } } diff --git a/t/snippets16.t b/t/snippets16.t index 20da519f..5a67997e 100644 --- a/t/snippets16.t +++ b/t/snippets16.t @@ -24,7 +24,7 @@ # To locate test #13 you can search for its name or the string '#13' use strict; -use Test; +use Test::More; use Carp; use Perl::Tidy; my $rparams; @@ -169,6 +169,8 @@ sub get_val() { } sub get_Val () { } sub Get_val () { } +my $sub1=sub () { }; +my $sub2=sub () { }; ---------- }; @@ -186,6 +188,8 @@ sub get_val() { } sub get_Val () { } sub Get_val () { } +my $sub1 = sub () { }; +my $sub2 = sub () { }; #1........... }, @@ -198,6 +202,8 @@ sub get_val () { } sub get_Val () { } sub Get_val () { } +my $sub1 = sub () { }; +my $sub2 = sub () { }; #2........... }, @@ -479,6 +485,6 @@ foreach my $key ( sort keys %{$rtests} ) { } } else { - ok( $output, $expect ); + is( $output, $expect, "$sname.$pname" ); } } diff --git a/t/snippets17.t b/t/snippets17.t index 19e4a3d5..22b3ca30 100644 --- a/t/snippets17.t +++ b/t/snippets17.t @@ -24,7 +24,7 @@ # To locate test #13 you can search for its name or the string '#13' use strict; -use Test; +use Test::More; use Carp; use Perl::Tidy; my $rparams; @@ -1041,6 +1041,6 @@ foreach my $key ( sort keys %{$rtests} ) { } } else { - ok( $output, $expect ); + is( $output, $expect, "$sname.$pname" ); } } diff --git a/t/snippets18.t b/t/snippets18.t index f8554385..140b62ad 100644 --- a/t/snippets18.t +++ b/t/snippets18.t @@ -24,7 +24,7 @@ # To locate test #13 you can search for its name or the string '#13' use strict; -use Test; +use Test::More; use Carp; use Perl::Tidy; my $rparams; @@ -693,6 +693,6 @@ foreach my $key ( sort keys %{$rtests} ) { } } else { - ok( $output, $expect ); + is( $output, $expect, "$sname.$pname" ); } } diff --git a/t/snippets19.t b/t/snippets19.t index 5c815587..ceef46da 100644 --- a/t/snippets19.t +++ b/t/snippets19.t @@ -24,7 +24,7 @@ # To locate test #13 you can search for its name or the string '#13' use strict; -use Test; +use Test::More; use Carp; use Perl::Tidy; my $rparams; @@ -468,6 +468,6 @@ foreach my $key ( sort keys %{$rtests} ) { } } else { - ok( $output, $expect ); + is( $output, $expect, "$sname.$pname" ); } } diff --git a/t/snippets2.t b/t/snippets2.t index 03a62595..ef199cfc 100644 --- a/t/snippets2.t +++ b/t/snippets2.t @@ -25,7 +25,7 @@ # To locate test #13 you can search for its name or the string '#13' use strict; -use Test; +use Test::More; use Carp; use Perl::Tidy; my $rparams; @@ -545,6 +545,6 @@ foreach my $key ( sort keys %{$rtests} ) { } } else { - ok( $output, $expect ); + is( $output, $expect, "$sname.$pname" ); } } diff --git a/t/snippets20.t b/t/snippets20.t index aad2cf44..df6753fb 100644 --- a/t/snippets20.t +++ b/t/snippets20.t @@ -7,7 +7,7 @@ # To locate test #13 you can search for its name or the string '#13' use strict; -use Test; +use Test::More; use Carp; use Perl::Tidy; my $rparams; @@ -120,6 +120,6 @@ foreach my $key ( sort keys %{$rtests} ) { } } else { - ok( $output, $expect ); + is( $output, $expect, "$sname.$pname" ); } } diff --git a/t/snippets3.t b/t/snippets3.t index 9d8bf290..725ee9f0 100644 --- a/t/snippets3.t +++ b/t/snippets3.t @@ -25,7 +25,7 @@ # To locate test #13 you can search for its name or the string '#13' use strict; -use Test; +use Test::More; use Carp; use Perl::Tidy; my $rparams; @@ -866,6 +866,6 @@ foreach my $key ( sort keys %{$rtests} ) { } } else { - ok( $output, $expect ); + is( $output, $expect, "$sname.$pname" ); } } diff --git a/t/snippets4.t b/t/snippets4.t index 1878425c..7de24453 100644 --- a/t/snippets4.t +++ b/t/snippets4.t @@ -25,7 +25,7 @@ # To locate test #13 you can search for its name or the string '#13' use strict; -use Test; +use Test::More; use Carp; use Perl::Tidy; my $rparams; @@ -568,6 +568,6 @@ foreach my $key ( sort keys %{$rtests} ) { } } else { - ok( $output, $expect ); + is( $output, $expect, "$sname.$pname" ); } } diff --git a/t/snippets5.t b/t/snippets5.t index f65be6ec..fffdcf8c 100644 --- a/t/snippets5.t +++ b/t/snippets5.t @@ -25,7 +25,7 @@ # To locate test #13 you can search for its name or the string '#13' use strict; -use Test; +use Test::More; use Carp; use Perl::Tidy; my $rparams; @@ -966,6 +966,6 @@ foreach my $key ( sort keys %{$rtests} ) { } } else { - ok( $output, $expect ); + is( $output, $expect, "$sname.$pname" ); } } diff --git a/t/snippets6.t b/t/snippets6.t index 4836fffc..4bfdcc6b 100644 --- a/t/snippets6.t +++ b/t/snippets6.t @@ -25,7 +25,7 @@ # To locate test #13 you can search for its name or the string '#13' use strict; -use Test; +use Test::More; use Carp; use Perl::Tidy; my $rparams; @@ -456,6 +456,6 @@ foreach my $key ( sort keys %{$rtests} ) { } } else { - ok( $output, $expect ); + is( $output, $expect, "$sname.$pname" ); } } diff --git a/t/snippets7.t b/t/snippets7.t index 078fcb68..b2954471 100644 --- a/t/snippets7.t +++ b/t/snippets7.t @@ -25,7 +25,7 @@ # To locate test #13 you can search for its name or the string '#13' use strict; -use Test; +use Test::More; use Carp; use Perl::Tidy; my $rparams; @@ -561,6 +561,6 @@ foreach my $key ( sort keys %{$rtests} ) { } } else { - ok( $output, $expect ); + is( $output, $expect, "$sname.$pname" ); } } diff --git a/t/snippets8.t b/t/snippets8.t index a8789d51..3b80a40a 100644 --- a/t/snippets8.t +++ b/t/snippets8.t @@ -25,7 +25,7 @@ # To locate test #13 you can search for its name or the string '#13' use strict; -use Test; +use Test::More; use Carp; use Perl::Tidy; my $rparams; @@ -503,6 +503,6 @@ foreach my $key ( sort keys %{$rtests} ) { } } else { - ok( $output, $expect ); + is( $output, $expect, "$sname.$pname" ); } } diff --git a/t/snippets9.t b/t/snippets9.t index 734ca624..c187d93f 100644 --- a/t/snippets9.t +++ b/t/snippets9.t @@ -25,7 +25,7 @@ # To locate test #13 you can search for its name or the string '#13' use strict; -use Test; +use Test::More; use Carp; use Perl::Tidy; my $rparams; @@ -525,6 +525,6 @@ foreach my $key ( sort keys %{$rtests} ) { } } else { - ok( $output, $expect ); + is( $output, $expect, "$sname.$pname" ); } }