r45955 - in /trunk/libtest-differences-perl: ./ debian/ eg/ lib/ t/

ghantoos-guest at users.alioth.debian.org ghantoos-guest at users.alioth.debian.org
Sat Oct 17 23:33:44 UTC 2009


Author: ghantoos-guest
Date: Sat Oct 17 23:33:39 2009
New Revision: 45955

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=45955
Log:
* New upstream release.
* debian/control:
  - Added myself to Uploaders.
  - Standards-Version bumped to 3.8.3.
  - Updated the debhelper dependency to (>= 7.0.50~).
  - Added Build-Depends-Indep on libtest-pod-coverage-perl 
    (needed by t/pod-coverage.t).
* debian/copyright:
  - Updated the Debian changelog to follow Revision 196 of the Copyright
    Proposal format.
  - Added copyright to new upstream author.

Added:
    trunk/libtest-differences-perl/Build.PL
      - copied unchanged from r45954, branches/upstream/libtest-differences-perl/current/Build.PL
    trunk/libtest-differences-perl/README
      - copied unchanged from r45954, branches/upstream/libtest-differences-perl/current/README
    trunk/libtest-differences-perl/lib/
      - copied from r45954, branches/upstream/libtest-differences-perl/current/lib/
    trunk/libtest-differences-perl/t/00-load.t
      - copied unchanged from r45954, branches/upstream/libtest-differences-perl/current/t/00-load.t
    trunk/libtest-differences-perl/t/boilerplate.t
      - copied unchanged from r45954, branches/upstream/libtest-differences-perl/current/t/boilerplate.t
    trunk/libtest-differences-perl/t/diff_styles.t
      - copied unchanged from r45954, branches/upstream/libtest-differences-perl/current/t/diff_styles.t
    trunk/libtest-differences-perl/t/pod-coverage.t
      - copied unchanged from r45954, branches/upstream/libtest-differences-perl/current/t/pod-coverage.t
    trunk/libtest-differences-perl/t/pod.t
      - copied unchanged from r45954, branches/upstream/libtest-differences-perl/current/t/pod.t
Removed:
    trunk/libtest-differences-perl/Differences.pm
    trunk/libtest-differences-perl/MANIFEST.SKIP
    trunk/libtest-differences-perl/eg/
    trunk/libtest-differences-perl/t/20test_more.t
Modified:
    trunk/libtest-differences-perl/Changes
    trunk/libtest-differences-perl/MANIFEST
    trunk/libtest-differences-perl/META.yml
    trunk/libtest-differences-perl/Makefile.PL
    trunk/libtest-differences-perl/debian/changelog
    trunk/libtest-differences-perl/debian/control
    trunk/libtest-differences-perl/debian/copyright
    trunk/libtest-differences-perl/t/00flatten.t
    trunk/libtest-differences-perl/t/01text_vs_data.t
    trunk/libtest-differences-perl/t/02pass.t
    trunk/libtest-differences-perl/t/03struct.t
    trunk/libtest-differences-perl/t/10test.t
    trunk/libtest-differences-perl/t/99example.t
    trunk/libtest-differences-perl/t/regression.t

Modified: trunk/libtest-differences-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-differences-perl/Changes?rev=45955&op=diff
==============================================================================
--- trunk/libtest-differences-perl/Changes (original)
+++ trunk/libtest-differences-perl/Changes Sat Oct 17 23:33:39 2009
@@ -1,4 +1,22 @@
 Changes file for Test::Differences
+
+0.50 Sat Oct 17 15:18:03 2009
+    - Production release.
+
+0.49_02 Sat Aug  2 13:00:21 GMT 2008
+    - Added support for all diff styles supplied by Text::Diff.  Requested by
+      Kevin Jones (http://rt.cpan.org/Public/Bug/Display.html?id=23579)
+    - Add Build.PL.
+    - Convert to universally use Test::More instead of Test.
+
+0.49_01 Fri Aug  1 09:04:58 GMT 2008
+    - Convert to modern Perl distribution.
+    - Applied doc suggestion from Slaven Rezic
+      (http://rt.cpan.org/Ticket/Display.html?id=24297)
+    - Bumped up version number higher than normal because I forgot to quote
+      the "developer release" number last time.
+    - Applied Mark Stosberg's  patch which fixed the { a => 1 } versus 
+      { a => '1' } bug (http://rt.cpan.org/Ticket/Display.html?id=3029)
 
 0.48_01 Wed Jul 30 10:42:52 GMT 2008
     - Fixed bug when comparing AoH with non-scalar values.  Reported (with

Modified: trunk/libtest-differences-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-differences-perl/MANIFEST?rev=45955&op=diff
==============================================================================
--- trunk/libtest-differences-perl/MANIFEST (original)
+++ trunk/libtest-differences-perl/MANIFEST Sat Oct 17 23:33:39 2009
@@ -1,14 +1,19 @@
+Build.PL
 Changes
-Differences.pm
+lib/Test/Differences.pm
+Makefile.PL
 MANIFEST
-MANIFEST.SKIP
-Makefile.PL
-eg/to_diff_or_not_to_diff
+README
+t/00-load.t
 t/00flatten.t
 t/01text_vs_data.t
 t/02pass.t
 t/03struct.t
 t/10test.t
-t/20test_more.t
 t/99example.t
+t/diff_styles.t
+t/boilerplate.t
+t/pod-coverage.t
+t/pod.t
 t/regression.t
+META.yml                                 Module meta-data (added by MakeMaker)

Modified: trunk/libtest-differences-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-differences-perl/META.yml?rev=45955&op=diff
==============================================================================
--- trunk/libtest-differences-perl/META.yml (original)
+++ trunk/libtest-differences-perl/META.yml Sat Oct 17 23:33:39 2009
@@ -1,13 +1,22 @@
---- #YAML:1.0
-name:                Test-Differences
-version:             0.4801
-abstract:            ~
-license:             ~
-author:              ~
-generated_by:        ExtUtils::MakeMaker version 6.42
-distribution_type:   module
-requires:     
-    Text::Diff:                    0.34
+---
+name: Test-Differences
+version: 0.500
+author:
+  - 'Curtis "Ovid" Poe <ovid at cpan.org>'
+abstract: Test strings and data structures and show differences if not ok
+license: perl
+resources:
+  license: http://dev.perl.org/licenses/
+requires:
+  Test::More: 0
+  Text::Diff: 0.35
+configure_requires:
+  Module::Build: 0.35
+provides:
+  Test::Differences:
+    file: lib/Test/Differences.pm
+    version: 0.500
+generated_by: Module::Build version 0.35
 meta-spec:
-    url:     http://module-build.sourceforge.net/META-spec-v1.3.html
-    version: 1.3
+  url: http://module-build.sourceforge.net/META-spec-v1.4.html
+  version: 1.4

Modified: trunk/libtest-differences-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-differences-perl/Makefile.PL?rev=45955&op=diff
==============================================================================
--- trunk/libtest-differences-perl/Makefile.PL (original)
+++ trunk/libtest-differences-perl/Makefile.PL Sat Oct 17 23:33:39 2009
@@ -1,19 +1,23 @@
+use strict;
+use warnings;
 use ExtUtils::MakeMaker;
 
+eval "use 5.006";
+if (my $error = $@) {
+    warn $error;
+    exit 0;
+}
+
 WriteMakefile(
-    NAME          => "Test::Differences",
-    VERSION_FROM  => "Differences.pm",
-    PREREQ_PM     => {
-        "Text::Diff" => 0.34,
+    NAME                => 'Test::Differences',
+    AUTHOR              => 'Curtis "Ovid" Poe <ovid at cpan.org>',
+    VERSION_FROM        => 'lib/Test/Differences.pm',
+    ABSTRACT_FROM       => 'lib/Test/Differences.pm',
+    PL_FILES            => {},
+    PREREQ_PM => {
+        'Test::More' => 0,
+        'Text::Diff' => 0.35,
     },
+    dist                => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
+    clean               => { FILES => 'Test-Differences-*' },
 );
-
-
-sub MY::libscan {
-   package MY ;
-   my $self = shift ;
-   my ( $path ) = @_ ;
-   return '' if /\.sw[a-z]$/ ;
-   return '' unless length $self->SUPER::libscan( $path ) ;
-   return $path ;
-}

Modified: trunk/libtest-differences-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-differences-perl/debian/changelog?rev=45955&op=diff
==============================================================================
--- trunk/libtest-differences-perl/debian/changelog (original)
+++ trunk/libtest-differences-perl/debian/changelog Sat Oct 17 23:33:39 2009
@@ -1,4 +1,17 @@
-libtest-differences-perl (0.48.01-2) UNRELEASED; urgency=low
+libtest-differences-perl (0.50-1) unstable; urgency=low
+
+  [ Ignace Mouzannar ]
+  * New upstream release.
+  * debian/control:
+    - Added myself to Uploaders.
+    - Standards-Version bumped to 3.8.3.
+    - Updated the debhelper dependency to (>= 7.0.50~).
+    - Added Build-Depends-Indep on libtest-pod-coverage-perl 
+      (needed by t/pod-coverage.t).
+  * debian/copyright:
+    - Updated the Debian changelog to follow Revision 196 of the Copyright
+      Proposal format.
+    - Added copyright to new upstream author.
 
   [ gregor herrmann ]
   * debian/control: Changed: Switched Vcs-Browser field to ViewSVN
@@ -10,7 +23,7 @@
     perl (>= 5.6.0-{12,16}) with an unversioned dependency on perl (as
     permitted by Debian Policy 3.8.3).
 
- -- gregor herrmann <gregoa at debian.org>  Sun, 16 Nov 2008 20:47:47 +0100
+ -- Ignace Mouzannar <mouzannar at gmail.com>  Sun, 18 Oct 2009 01:28:35 +0200
 
 libtest-differences-perl (0.48.01-1) unstable; urgency=low
 

Modified: trunk/libtest-differences-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-differences-perl/debian/control?rev=45955&op=diff
==============================================================================
--- trunk/libtest-differences-perl/debian/control (original)
+++ trunk/libtest-differences-perl/debian/control Sat Oct 17 23:33:39 2009
@@ -2,9 +2,10 @@
 Section: perl
 Priority: optional
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
-Uploaders: Jay Bonci <jaybonci at debian.org>, Damyan Ivanov <dmn at debian.org>
-Build-Depends-Indep: debhelper (>= 7), perl, libtext-diff-perl
-Standards-Version: 3.8.0
+Uploaders: Jay Bonci <jaybonci at debian.org>, Damyan Ivanov <dmn at debian.org>,
+ Ignace Mouzannar <mouzannar at gmail.com>
+Build-Depends-Indep: debhelper (>= 7.0.50~), perl, libtext-diff-perl, libtest-pod-coverage-perl
+Standards-Version: 3.8.3
 Homepage: http://search.cpan.org/dist/Test-Differences/
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libtest-differences-perl/
 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libtest-differences-perl/

Modified: trunk/libtest-differences-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-differences-perl/debian/copyright?rev=45955&op=diff
==============================================================================
--- trunk/libtest-differences-perl/debian/copyright (original)
+++ trunk/libtest-differences-perl/debian/copyright Sat Oct 17 23:33:39 2009
@@ -1,17 +1,37 @@
-This package was debianized by Jay Bonci <jay at bonci.com> on
-Thu, 23 Jan 2003 10:00:55 -0500.
+Format-Specification:
+    http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196
+Upstream-Maintainer: Curtis "Ovid" Poe <ovid at cpan.org>
+Upstream-Source: http://search.cpan.org/dist/Test-Differences
+Upstream-Name: Test-Differences
 
-It was downloaded from http://search.cpan.org/dist/Test-Differences
+Files: *
+Copyright:
+    2008-2009, Curtis "Ovid" Poe <ovid at cpan.org>
+    2001, Barrie Slaymaker <barries at slaysys.com>
+License-Alias: Perl
+Licence: Artistic | GPL-1+
 
-Upstream Author: Barrie Slaymaker <barries at slaysys.com>
+Files: debian/*
+Copyright: 
+    2009, Ignace Mouzannar <mouzannar at gmail.com>
+    2008, gregor herrmann <gregoa at debian.org>
+    2008, Damyan Ivanov <dmn at debian.org>
+    2003-2004, Jay Bonci <jaybonci at debian.org>
+License: Artistic | GPL-1+
 
-Copyright:
-    Copyright 2001 Barrie Slaymaker, All Rights Reserved.
+License: Artistic
 
-License:
-    You may use this software under the terms of the GNU public license, any
-    version, or the Artistic license.
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Artistic License, which comes with Perl.
+    On Debian GNU/Linux systems, the complete text of the Artistic License
+    can be found in `/usr/share/common-licenses/Artistic'
 
-On Debian systems, the full text of GNU General Public License can be found in
-/usr/share/common-licenses/GPL and the full text of the Artistic license can
-be found in /usr/share/common-licenses/Artistic
+Licence: GPL-1+
+
+    This package is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 1 of the License, or
+    any later version.
+    On Debian GNU/Linux systems, the complete text of the GNU General
+    Public License can be found in `/usr/share/common-licenses/GPL'.
+

Modified: trunk/libtest-differences-perl/t/00flatten.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-differences-perl/t/00flatten.t?rev=45955&op=diff
==============================================================================
--- trunk/libtest-differences-perl/t/00flatten.t (original)
+++ trunk/libtest-differences-perl/t/00flatten.t Sat Oct 17 23:33:39 2009
@@ -1,30 +1,27 @@
-use Test ;
+use Test::More;
 
-use Test::Differences ;
+use Test::Differences;
 
-sub f($) {
+sub flatten($) {
     my $out = join "|",
-        @{Test::Differences::_flatten( 
-	    Test::Differences::_grok_type( $_[0] ),
-	    $_[0]
-	)
-    } ;
-    $out =~ s/ +//g ;
-    $out ;
+      @{
+        Test::Differences::_flatten( Test::Differences::_grok_type( $_[0] ),
+            $_[0] )
+      };
+    $out =~ s/ +//g;
+    $out;
 }
-
-my @tests = (
-sub { ok f "a",                      "a"           },
-sub { ok f "a\nb\n",                 "a\n|b\n"     },
-sub { ok f [qw( a b )],              "a|b"         },
-sub { ok f [[qw( a b )], [qw(c d)]], "a,b|c,d"     },
-sub { ok f [{ a => 0, b => 1 }, { a => 2, c => 3}],
-    "a,b,c|0,1,<undef>|2,<undef>,3"
-},
 ## Complex data structures are not flattened, they're dumped, so don't
 ## test that here.
-) ;
+my @cases = (
+    "a"                        => "a",
+    "a\nb\n"                   => "a\n|b\n",
+    [qw( a b )]                => "a|b",
+    [ [qw( a b )], [qw(c d)] ] => "a,b|c,d",
+    [ { a => 0, b => 1 }, { a => 2, c => 3 } ] => "a,b,c|0,1,<undef>|2,<undef>,3"
+);
 
-plan tests => scalar @tests ;
-
-$_->() for @tests ;
+plan tests => @cases / 2;
+while ( my ( $data, $result ) = splice @cases, 0, 2 ) {
+    is flatten $data, $result, $result;
+}

Modified: trunk/libtest-differences-perl/t/01text_vs_data.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-differences-perl/t/01text_vs_data.t?rev=45955&op=diff
==============================================================================
--- trunk/libtest-differences-perl/t/01text_vs_data.t (original)
+++ trunk/libtest-differences-perl/t/01text_vs_data.t Sat Oct 17 23:33:39 2009
@@ -1,18 +1,20 @@
-use Test ;
-
-use Test::Differences ;
+use Test::More;
+use Test::Differences;
 
 # use large enough data sets that this thing chooses context => 3 instead
 # of "full document context".
-my $a = ("\n" x 30 ) . "a\n" ;
-my $b = ("\n" x 30 ) . "b\n" ;
+my $a = ( "\n" x 30 ) . "a\n";
+my $b = ( "\n" x 30 ) . "b\n";
 
 my @tests = (
-sub { eq_or_diff $a, $b },
-sub { eq_or_diff_text $a, $b },
-sub { eq_or_diff_data $a, $b },
-) ;
+    sub { eq_or_diff $a,      $b },
+    sub { eq_or_diff_text $a, $b },
+    sub { eq_or_diff_data $a, $b },
+);
 
-plan tests => scalar @tests, todo => [1.. at tests] ;
+plan tests => scalar @tests;
 
-$_->() for @tests ;
+TODO: {
+    local $TODO = 'Force the output to be displayed';
+    $_->() for @tests;
+}

Modified: trunk/libtest-differences-perl/t/02pass.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-differences-perl/t/02pass.t?rev=45955&op=diff
==============================================================================
--- trunk/libtest-differences-perl/t/02pass.t (original)
+++ trunk/libtest-differences-perl/t/02pass.t Sat Oct 17 23:33:39 2009
@@ -1,16 +1,15 @@
-use Test ;
-
-use Test::Differences ;
+use Test::More;
+use Test::Differences;
 
 # use large enough data sets that this thing chooses context => 3 instead
 # of "full document context".
-my $a = ("\n" x 30 ) . "a\n" ;
-my $b = ("\n" x 30 ) . "b\n" ;
+my $a = ( "\n" x 30 ) . "a\n";
+my $b = ( "\n" x 30 ) . "b\n";
 
-my @tests = (
-sub { eq_or_diff [ "a", "b" ], [ "a", "b" ] },
-) ;
+my @tests = ( 
+    sub { eq_or_diff [ "a", "b" ], [ "a", "b" ] }, 
+);
 
 plan tests => scalar @tests;
 
-$_->() for @tests ;
+$_->() for @tests;

Modified: trunk/libtest-differences-perl/t/03struct.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-differences-perl/t/03struct.t?rev=45955&op=diff
==============================================================================
--- trunk/libtest-differences-perl/t/03struct.t (original)
+++ trunk/libtest-differences-perl/t/03struct.t Sat Oct 17 23:33:39 2009
@@ -1,19 +1,19 @@
-use Test ;
+use Test::More;
 
-use Test::Differences ;
+use Test::Differences;
 
 ## This mind-bender submitted by Yves Orton <demerphq at hotmail.com>
 my ( $ar, $x, $y );
 $ar->[0] = \$ar->[1];
 $ar->[1] = \$ar->[0];
-$x = \$y;
-$y = \$x;
+$x       = \$y;
+$y       = \$x;
 
 my @tests = (
-sub { eq_or_diff [ \"a", \"b" ], [ \"a", \"b" ] },
-sub { eq_or_diff $ar, [ $x, $y ] },
-) ;
+    sub { eq_or_diff [ \"a", \"b" ], [ \"a", \"b" ] },
+    sub { eq_or_diff $ar, [ $x, $y ] },
+);
 
 plan tests => scalar @tests;
 
-$_->() for @tests ;
+$_->() for @tests;

Modified: trunk/libtest-differences-perl/t/10test.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-differences-perl/t/10test.t?rev=45955&op=diff
==============================================================================
--- trunk/libtest-differences-perl/t/10test.t (original)
+++ trunk/libtest-differences-perl/t/10test.t Sat Oct 17 23:33:39 2009
@@ -1,19 +1,20 @@
-use Test ;
+use Test::More;
 
-use Test::Differences ;
+use Test::Differences;
 
 my @tests = (
-sub { eq_or_diff "a", "a" },
-sub { eq_or_diff "a", "b" },
-sub { eq_or_diff "a\nb\nc\n", "a\nc\n" },
-sub { eq_or_diff "a\nb\nc\n", "a\nB\nc\n" },
-sub { eq_or_diff "a\nb\nc\nd\ne\n", "a\nc\ne\n" },
-sub { eq_or_diff "a\nb\nc\nd\ne\n", "a\nb\nd\ne\n", { context => 0 } },
-sub { eq_or_diff "a\nb\nc\nd\ne\n", "a\nb\nd\ne\n", { context => 10 } },
-) ;
+    sub { eq_or_diff "a",               "b" },
+    sub { eq_or_diff "a\nb\nc\n",       "a\nc\n" },
+    sub { eq_or_diff "a\nb\nc\n",       "a\nB\nc\n" },
+    sub { eq_or_diff "a\nb\nc\nd\ne\n", "a\nc\ne\n" },
+    sub { eq_or_diff "a\nb\nc\nd\ne\n", "a\nb\nd\ne\n", { context => 0 } },
+    sub { eq_or_diff "a\nb\nc\nd\ne\n", "a\nb\nd\ne\n", { context => 10 } },
+);
 
-plan tests => scalar @tests, todo => [2.. at tests] ;
+plan tests => scalar @tests;
+diag "This test misuses TODO: these TODOs are actually real tests.\n";
 
-print "# This test misuses TODO: these TODOs are actually real tests.\n";
-
-$_->() for @tests ;
+TODO: {
+    local $TODO = 'Deliberate misuse of TODO';
+    $_->() for @tests;
+}

Modified: trunk/libtest-differences-perl/t/99example.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-differences-perl/t/99example.t?rev=45955&op=diff
==============================================================================
--- trunk/libtest-differences-perl/t/99example.t (original)
+++ trunk/libtest-differences-perl/t/99example.t Sat Oct 17 23:33:39 2009
@@ -38,4 +38,4 @@
     skip $x, "" ;
 FALLBACK
 
-die $@ if $@ ;
+die $@ if $@;

Modified: trunk/libtest-differences-perl/t/regression.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-differences-perl/t/regression.t?rev=45955&op=diff
==============================================================================
--- trunk/libtest-differences-perl/t/regression.t (original)
+++ trunk/libtest-differences-perl/t/regression.t Sat Oct 17 23:33:39 2009
@@ -1,24 +1,25 @@
+#!/usr/bin/perl -w
 
-use Test;
+use strict;
 
+use Test::More;
 use Test::Differences;
 
-my $got = [
-    { a => 1 },
-    {   b => 1,
-        c => [],
-    }
-];
-my $expected = [
-    { a => 1 },
-    {   b => 1,
-        c => [],
-    }
-];
+my %cases = (
+    'AoH with non-scalar values' => {
+        got      => [ { a => 1 }, { b => 1, c => [] } ],
+        expected => [ { a => 1 }, { b => 1, c => [] } ]
+    },
+    'Numbers and strings' => {
+        got      => { order_id => 127   },
+        expected => { order_id => '127' },
+    },
+);
 
-my @tests = (
-    sub { eq_or_diff $got, $expected },
-);
+my @tests;
+while ( my ( $name, $test ) = each %cases ) {
+    push @tests => sub { eq_or_diff $test->{got}, $test->{expected}, $name };
+}
 
 plan tests => scalar @tests;
 




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