r77873 - in /branches/upstream/libhtml-format-perl/current: Build.PL Changes META.json META.yml README lib/HTML/FormatPS.pm lib/HTML/FormatRTF.pm lib/HTML/FormatText.pm lib/HTML/Formatter.pm t/01_ps.t t/02_rtf.t t/03_text.t t/rt69426.t

angelabad-guest at users.alioth.debian.org angelabad-guest at users.alioth.debian.org
Tue Jul 26 13:53:41 UTC 2011


Author: angelabad-guest
Date: Tue Jul 26 13:53:39 2011
New Revision: 77873

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=77873
Log:
[svn-upgrade] new version libhtml-format-perl (2.10)

Modified:
    branches/upstream/libhtml-format-perl/current/Build.PL
    branches/upstream/libhtml-format-perl/current/Changes
    branches/upstream/libhtml-format-perl/current/META.json
    branches/upstream/libhtml-format-perl/current/META.yml
    branches/upstream/libhtml-format-perl/current/README
    branches/upstream/libhtml-format-perl/current/lib/HTML/FormatPS.pm
    branches/upstream/libhtml-format-perl/current/lib/HTML/FormatRTF.pm
    branches/upstream/libhtml-format-perl/current/lib/HTML/FormatText.pm
    branches/upstream/libhtml-format-perl/current/lib/HTML/Formatter.pm
    branches/upstream/libhtml-format-perl/current/t/01_ps.t
    branches/upstream/libhtml-format-perl/current/t/02_rtf.t
    branches/upstream/libhtml-format-perl/current/t/03_text.t
    branches/upstream/libhtml-format-perl/current/t/rt69426.t

Modified: branches/upstream/libhtml-format-perl/current/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-format-perl/current/Build.PL?rev=77873&op=diff
==============================================================================
--- branches/upstream/libhtml-format-perl/current/Build.PL (original)
+++ branches/upstream/libhtml-format-perl/current/Build.PL Tue Jul 26 13:53:39 2011
@@ -27,7 +27,7 @@
     'Gisle Aas <gisle at ActiveState.com>'
   ],
   'dist_name' => 'HTML-Format',
-  'dist_version' => '2.09',
+  'dist_version' => '2.10',
   'license' => 'perl',
   'module_name' => 'HTML::Format',
   'recommends' => {},

Modified: branches/upstream/libhtml-format-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-format-perl/current/Changes?rev=77873&op=diff
==============================================================================
--- branches/upstream/libhtml-format-perl/current/Changes (original)
+++ branches/upstream/libhtml-format-perl/current/Changes Tue Jul 26 13:53:39 2011
@@ -1,3 +1,9 @@
+2.10      2011-07-18 17:07:35 Europe/London
+    - Tests reworked to not use subtests.  Development versions
+      of Test::More do not support subtests, and the smokers
+      that are running with these dev versions then send me
+      confusing test failures.  This is a pain.
+
 2.09      2011-07-15 14:20:12 Europe/London
     - Reworking of HTML quote issue in FormatPS
     - Now remap all double quotes to " in FormatPS (which is not

Modified: branches/upstream/libhtml-format-perl/current/META.json
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-format-perl/current/META.json?rev=77873&op=diff
==============================================================================
--- branches/upstream/libhtml-format-perl/current/META.json (original)
+++ branches/upstream/libhtml-format-perl/current/META.json Tue Jul 26 13:53:39 2011
@@ -67,19 +67,19 @@
    "provides" : {
       "HTML::FormatPS" : {
          "file" : "lib/HTML/FormatPS.pm",
-         "version" : "2.09"
+         "version" : "2.10"
       },
       "HTML::FormatRTF" : {
          "file" : "lib/HTML/FormatRTF.pm",
-         "version" : "2.09"
+         "version" : "2.10"
       },
       "HTML::FormatText" : {
          "file" : "lib/HTML/FormatText.pm",
-         "version" : "2.09"
+         "version" : "2.10"
       },
       "HTML::Formatter" : {
          "file" : "lib/HTML/Formatter.pm",
-         "version" : "2.09"
+         "version" : "2.10"
       }
    },
    "release_status" : "stable",
@@ -95,7 +95,7 @@
          "web" : "http://github.com/nigelm/html-format"
       }
    },
-   "version" : "2.09",
+   "version" : "2.10",
    "x_Dist_Zilla" : {
       "plugins" : [
          {

Modified: branches/upstream/libhtml-format-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-format-perl/current/META.yml?rev=77873&op=diff
==============================================================================
--- branches/upstream/libhtml-format-perl/current/META.yml (original)
+++ branches/upstream/libhtml-format-perl/current/META.yml Tue Jul 26 13:53:39 2011
@@ -26,16 +26,16 @@
 provides:
   HTML::FormatPS:
     file: lib/HTML/FormatPS.pm
-    version: 2.09
+    version: 2.10
   HTML::FormatRTF:
     file: lib/HTML/FormatRTF.pm
-    version: 2.09
+    version: 2.10
   HTML::FormatText:
     file: lib/HTML/FormatText.pm
-    version: 2.09
+    version: 2.10
   HTML::Formatter:
     file: lib/HTML/Formatter.pm
-    version: 2.09
+    version: 2.10
 requires:
   Carp: 0
   Data::Dumper: 0
@@ -62,7 +62,7 @@
   bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=HTML-Format
   homepage: http://search.cpan.org/dist/HTML-Format
   repository: git://github.com/nigelm/html-format.git
-version: 2.09
+version: 2.10
 x_Dist_Zilla:
   plugins:
     -

Modified: branches/upstream/libhtml-format-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-format-perl/current/README?rev=77873&op=diff
==============================================================================
--- branches/upstream/libhtml-format-perl/current/README (original)
+++ branches/upstream/libhtml-format-perl/current/README Tue Jul 26 13:53:39 2011
@@ -2,7 +2,7 @@
     HTML::Formatter - Base class for HTML formatters
 
 VERSION
-    version 2.09
+    version 2.10
 
 SYNOPSIS
       use HTML::FormatSomething;

Modified: branches/upstream/libhtml-format-perl/current/lib/HTML/FormatPS.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-format-perl/current/lib/HTML/FormatPS.pm?rev=77873&op=diff
==============================================================================
--- branches/upstream/libhtml-format-perl/current/lib/HTML/FormatPS.pm (original)
+++ branches/upstream/libhtml-format-perl/current/lib/HTML/FormatPS.pm Tue Jul 26 13:53:39 2011
@@ -13,7 +13,7 @@
 
 use base 'HTML::Formatter';
 
-our $VERSION = '2.09'; # VERSION
+our $VERSION = '2.10'; # VERSION
 our $AUTHORITY = 'cpan:NIGELM'; # AUTHORITY
 
 # We now use Smart::Comments in place of the old DEBUG framework.
@@ -876,7 +876,7 @@
 
 =head1 VERSION
 
-version 2.09
+version 2.10
 
 =head1 SYNOPSIS
 

Modified: branches/upstream/libhtml-format-perl/current/lib/HTML/FormatRTF.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-format-perl/current/lib/HTML/FormatRTF.pm?rev=77873&op=diff
==============================================================================
--- branches/upstream/libhtml-format-perl/current/lib/HTML/FormatRTF.pm (original)
+++ branches/upstream/libhtml-format-perl/current/lib/HTML/FormatRTF.pm Tue Jul 26 13:53:39 2011
@@ -13,7 +13,7 @@
 
 use base 'HTML::Formatter';
 
-our $VERSION = '2.09'; # VERSION
+our $VERSION = '2.10'; # VERSION
 our $AUTHORITY = 'cpan:NIGELM'; # AUTHORITY
 
 # ------------------------------------------------------------------------
@@ -509,7 +509,7 @@
 
 =head1 VERSION
 
-version 2.09
+version 2.10
 
 =head1 SYNOPSIS
 

Modified: branches/upstream/libhtml-format-perl/current/lib/HTML/FormatText.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-format-perl/current/lib/HTML/FormatText.pm?rev=77873&op=diff
==============================================================================
--- branches/upstream/libhtml-format-perl/current/lib/HTML/FormatText.pm (original)
+++ branches/upstream/libhtml-format-perl/current/lib/HTML/FormatText.pm Tue Jul 26 13:53:39 2011
@@ -13,7 +13,7 @@
 
 use base 'HTML::Formatter';
 
-our $VERSION = '2.09'; # VERSION
+our $VERSION = '2.10'; # VERSION
 our $AUTHORITY = 'cpan:NIGELM'; # AUTHORITY
 
 # ------------------------------------------------------------------------
@@ -221,7 +221,7 @@
 
 =head1 VERSION
 
-version 2.09
+version 2.10
 
 =head1 SYNOPSIS
 

Modified: branches/upstream/libhtml-format-perl/current/lib/HTML/Formatter.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-format-perl/current/lib/HTML/Formatter.pm?rev=77873&op=diff
==============================================================================
--- branches/upstream/libhtml-format-perl/current/lib/HTML/Formatter.pm (original)
+++ branches/upstream/libhtml-format-perl/current/lib/HTML/Formatter.pm Tue Jul 26 13:53:39 2011
@@ -14,7 +14,7 @@
 # this should be commented out in release versions....
 ##use Smart::Comments;
 
-our $VERSION = '2.09'; # VERSION
+our $VERSION = '2.10'; # VERSION
 our $AUTHORITY = 'cpan:NIGELM'; # AUTHORITY
 
 #
@@ -798,7 +798,7 @@
 
 =head1 VERSION
 
-version 2.09
+version 2.10
 
 =head1 SYNOPSIS
 

Modified: branches/upstream/libhtml-format-perl/current/t/01_ps.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-format-perl/current/t/01_ps.t?rev=77873&op=diff
==============================================================================
--- branches/upstream/libhtml-format-perl/current/t/01_ps.t (original)
+++ branches/upstream/libhtml-format-perl/current/t/01_ps.t Tue Jul 26 13:53:39 2011
@@ -4,14 +4,15 @@
 use Test::More 0.96;
 
 BEGIN { use_ok("HTML::FormatPS"); }
-my $obj = new_ok("HTML::FormatPS");
 
 foreach my $infile ( glob( File::Spec->catfile( 't', 'data', 'in', '*.html' ) ) ) {
-    subtest "Testing file handling for $infile" => sub {
-        my $expfilename = ( File::Spec->splitpath($infile) )[2];
-        $expfilename =~ s/\.html$/.ps/i;
-        my $expfile = File::Spec->catfile( 't', 'data', 'expected', $expfilename );
-        plan 'skip_all' unless ( -f $infile and -f $expfile );
+    my $obj = new_ok("HTML::FormatPS");
+    ok( -f $infile, "Testing file handling for $infile" );
+    my $expfilename = ( File::Spec->splitpath($infile) )[2];
+    $expfilename =~ s/\.html$/.ps/i;
+    my $expfile = File::Spec->catfile( 't', 'data', 'expected', $expfilename );
+    ok( -f $expfile, '  Expected result file exists' );
+    if ( -f $expfile ) {
 
         # read file content - split into lines, but we exclude the
         # structured comment lines starting with %% since they include
@@ -25,7 +26,7 @@
         my $text = HTML::FormatPS->format_file( $infile, leftmargin => 5, rightmargin => 50 );
         my $got_lines = [ grep !/^\%\%/, ( split( /\n/, $text ) ) ];
 
-        ok( length($text), "Returned a string" );
+        ok( length($text), '  Returned a string from conversion' );
 
         # It appears minor maths differences mean a few lines fail to match
         # because a glyth is misplaced by a fraction of a point....
@@ -41,15 +42,15 @@
 
         # test how good the match is
         if ( scalar( @{$got_lines} ) == $ok_count ) {
-            pass('Perfect match of postcript output');
+            pass('  Perfect match of postcript output');
         }
         else {
 
             # we test for a 90% or better match
             ok( ( ( scalar( @{$got_lines} ) - $ok_count ) <= ( scalar( @{$got_lines} ) / 10 ) ),
-                'Better than 90% output lines match' );
+                '  Better than 90% output lines match' );
         }
-    };
+    }
 }
 
 # finish up

Modified: branches/upstream/libhtml-format-perl/current/t/02_rtf.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-format-perl/current/t/02_rtf.t?rev=77873&op=diff
==============================================================================
--- branches/upstream/libhtml-format-perl/current/t/02_rtf.t (original)
+++ branches/upstream/libhtml-format-perl/current/t/02_rtf.t Tue Jul 26 13:53:39 2011
@@ -4,14 +4,15 @@
 use Test::More 0.96;
 
 BEGIN { use_ok("HTML::FormatRTF"); }
-my $obj = new_ok("HTML::FormatRTF");
 
 foreach my $infile ( glob( File::Spec->catfile( 't', 'data', 'in', '*.html' ) ) ) {
-    subtest "Testing file handling for $infile" => sub {
-        my $expfilename = ( File::Spec->splitpath($infile) )[2];
-        $expfilename =~ s/\.html$/.rtf/i;
-        my $expfile = File::Spec->catfile( 't', 'data', 'expected', $expfilename );
-        plan 'skip_all' unless ( -f $infile and -f $expfile );
+    my $obj = new_ok("HTML::FormatRTF");
+    ok( -f $infile, "Testing file handling for $infile" );
+    my $expfilename = ( File::Spec->splitpath($infile) )[2];
+    $expfilename =~ s/\.html$/.rtf/i;
+    my $expfile = File::Spec->catfile( 't', 'data', 'expected', $expfilename );
+    ok( -f $expfile, '  Expected result file exists' );
+    if ( -f $expfile ) {
 
         # read file content - split into lines, but we exclude the
         # doccomm line since it includes a timestamp and version information
@@ -24,9 +25,9 @@
         my $text = HTML::FormatRTF->format_file( $infile, leftmargin => 5, rightmargin => 50 );
         my $got_lines = [ grep !/doccomm/, ( split( /\n/, $text ) ) ];
 
-        ok( length($text), "Returned a string" );
-        is_deeply( $got_lines, $exp_lines, "Correct text string returned" );
-    };
+        ok( length($text), '  Returned a string from conversion' );
+        is_deeply( $got_lines, $exp_lines, '  Correct text string returned' );
+    }
 }
 
 # finish up

Modified: branches/upstream/libhtml-format-perl/current/t/03_text.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-format-perl/current/t/03_text.t?rev=77873&op=diff
==============================================================================
--- branches/upstream/libhtml-format-perl/current/t/03_text.t (original)
+++ branches/upstream/libhtml-format-perl/current/t/03_text.t Tue Jul 26 13:53:39 2011
@@ -4,14 +4,15 @@
 use Test::More 0.96;
 
 BEGIN { use_ok("HTML::FormatText"); }
-my $obj = new_ok("HTML::FormatText");
 
 foreach my $infile ( glob( File::Spec->catfile( 't', 'data', 'in', '*.html' ) ) ) {
-    subtest "Testing file handling for $infile" => sub {
-        my $expfilename = ( File::Spec->splitpath($infile) )[2];
-        $expfilename =~ s/\.html$/.txt/i;
-        my $expfile = File::Spec->catfile( 't', 'data', 'expected', $expfilename );
-        plan 'skip_all' unless ( -f $infile and -f $expfile );
+    my $obj = new_ok("HTML::FormatText");
+    ok( -f $infile, "Testing file handling for $infile" );
+    my $expfilename = ( File::Spec->splitpath($infile) )[2];
+    $expfilename =~ s/\.html$/.txt/i;
+    my $expfile = File::Spec->catfile( 't', 'data', 'expected', $expfilename );
+    ok( -f $expfile, '  Expected result file exists' );
+    if ( -f $expfile ) {
 
         # read file content - use older style slurp
         local (*FH);
@@ -23,9 +24,9 @@
         my $text = HTML::FormatText->format_file( $infile, leftmargin => 5, rightmargin => 50 );
         my $got_lines = [ split( /\n/, $text ) ];
 
-        ok( length($text), "Returned a string" );
-        is_deeply( $got_lines, $exp_lines, "Correct text string returned" );
-    };
+        ok( length($text), '  Returned a string from conversion' );
+        is_deeply( $got_lines, $exp_lines, '  Correct text string returned' );
+    }
 }
 
 # build a set of tests
@@ -36,17 +37,19 @@
     [ "<p>Two</p><p>Paragraphs</p>",              "   Two\n\n   Paragraphs\n",    "Two Paragraphs" ],
     [ "<p>An <em>italicised</em> paragraph</p>",  "   An italicised paragraph\n", "Em Formatted paragraph" ],
     [ "<p>A <strong>bold</strong> paragraph</p>", "   A bold paragraph\n",        "Strong Formatted paragraph" ],
-    [ "<ol><li>one</li><li>two</li><li>three</li></ol>", "     1. one\n\n     2. two\n\n     3. three\n", "Numbered list" ],
-    [ "<ul><li>one</li><li>two</li><li>three</li></ul>", "     * one\n\n     * two\n\n     * three\n",    "Bullet list" ],
+    [   "<ol><li>one</li><li>two</li><li>three</li></ol>",
+        "     1. one\n\n     2. two\n\n     3. three\n",
+        "Numbered list"
+    ],
+    [ "<ul><li>one</li><li>two</li><li>three</li></ul>", "     * one\n\n     * two\n\n     * three\n", "Bullet list" ],
 );
 
 # and step through them
-subtest 'Fragment tests' => sub {
-    foreach my $frags (@test_fragments) {
-        my $fmt = HTML::FormatText->new();
-        is( $fmt->format_from_string( $frags->[0] ), $frags->[1], $frags->[2] );
-    }
-};
+ok( scalar(@test_fragments), 'Fragment tests' );
+foreach my $frags (@test_fragments) {
+    my $fmt = HTML::FormatText->new();
+    is( $fmt->format_from_string( $frags->[0] ), $frags->[1], ( '  ' . $frags->[2] ) );
+}
 
 # finish up
 done_testing();

Modified: branches/upstream/libhtml-format-perl/current/t/rt69426.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-format-perl/current/t/rt69426.t?rev=77873&op=diff
==============================================================================
--- branches/upstream/libhtml-format-perl/current/t/rt69426.t (original)
+++ branches/upstream/libhtml-format-perl/current/t/rt69426.t Tue Jul 26 13:53:39 2011
@@ -26,16 +26,16 @@
 
 foreach my $quoted ( sort { $a cmp $b } keys %{$table} ) {
     my $desc = $table->{$quoted};
-    subtest "Checking $quoted -> $desc", sub {
         my $obj   = new_ok("HTML::FormatPS");
         my $htree = new_ok("HTML::TreeBuilder");
+        
         my $html  = '<html><body>The ' . $desc . ' is a ' . $quoted . ' character</body></html>';
-        ok( $html, "HTML string containing an $desc" );
+        ok( $html, "HTML string containing an $desc should map to $desc" );
 
-        ok( $htree->parse_content($html), 'Parse HTML content' );
+        ok( $htree->parse_content($html), '  Parse HTML content' );
 
         my $result = $obj->format_string($html);
-        ok( $result, 'Converted HTML object' );
+        ok( $result, '  Converted HTML object' );
 
         # count high bit characters
         my $count;
@@ -51,7 +51,7 @@
             }
         }
 
-        ok( ( $count == 0 ), 'No unexpected high-bit characters found' );
+        ok( ( $count == 0 ), '  No unexpected high-bit characters found' );
 
         ## # stuff postscript out into file - uncomment if you need for debugging
         ## my $fn = $quoted;
@@ -61,10 +61,6 @@
 
         ## # tell details about errors - uncomment if needed
         ## diag( dump( { orig => $html, dump => $htree->dump, result => $result } ) ) if ($count);
-
-        done_testing();
-    };
-
 }
 
 # finish up




More information about the Pkg-perl-cvs-commits mailing list