r33857 - in /branches/upstream/libwww-mechanize-formfiller-perl/current: ./ lib/WWW/Mechanize/ lib/WWW/Mechanize/FormFiller/ lib/WWW/Mechanize/FormFiller/Value/ lib/WWW/Mechanize/FormFiller/Value/Random/ t/

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Fri Apr 24 09:15:35 UTC 2009


Author: dmn
Date: Fri Apr 24 09:15:29 2009
New Revision: 33857

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=33857
Log:
[svn-upgrade] Integrating new upstream version, libwww-mechanize-formfiller-perl (0.09)

Added:
    branches/upstream/libwww-mechanize-formfiller-perl/current/t/99-manifest.t   (with props)
    branches/upstream/libwww-mechanize-formfiller-perl/current/t/99-todo.t   (with props)
    branches/upstream/libwww-mechanize-formfiller-perl/current/t/99-unix-text.t   (with props)
    branches/upstream/libwww-mechanize-formfiller-perl/current/t/99-versions.t   (with props)
Removed:
    branches/upstream/libwww-mechanize-formfiller-perl/current/t/08-FF-fillout.t
Modified:
    branches/upstream/libwww-mechanize-formfiller-perl/current/Changes
    branches/upstream/libwww-mechanize-formfiller-perl/current/MANIFEST
    branches/upstream/libwww-mechanize-formfiller-perl/current/META.yml
    branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller.pm
    branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value.pm
    branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Callback.pm
    branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Default.pm
    branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Fixed.pm
    branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Interactive.pm
    branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Keep.pm
    branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Random.pm
    branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Random/Chars.pm
    branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Random/Date.pm
    branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Random/Word.pm
    branches/upstream/libwww-mechanize-formfiller-perl/current/t/04-FF-api.t
    branches/upstream/libwww-mechanize-formfiller-perl/current/t/99-pod.t

Modified: branches/upstream/libwww-mechanize-formfiller-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-formfiller-perl/current/Changes?rev=33857&op=diff
==============================================================================
--- branches/upstream/libwww-mechanize-formfiller-perl/current/Changes (original)
+++ branches/upstream/libwww-mechanize-formfiller-perl/current/Changes Fri Apr 24 09:15:29 2009
@@ -1,4 +1,9 @@
 Revision history for Perl extension WWW::Mechanize::FormFiller.
+
+0.09 20090418
+  . Test fix, no need to update
+  - Finally remove t/08*, which checked for HTML::Form behaviour which changed
+  - Update author test suite
 
 0.08 20071009
   - Rerelease because the old one went missing

Modified: branches/upstream/libwww-mechanize-formfiller-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-formfiller-perl/current/MANIFEST?rev=33857&op=diff
==============================================================================
--- branches/upstream/libwww-mechanize-formfiller-perl/current/MANIFEST (original)
+++ branches/upstream/libwww-mechanize-formfiller-perl/current/MANIFEST Fri Apr 24 09:15:29 2009
@@ -21,8 +21,11 @@
 t/05-Form-1.t
 t/06-Form-Image-Button.t
 t/07-FF-Value-Random.t
-t/08-FF-fillout.t
 t/99-pod.t
+t/99-manifest.t
+t/99-todo.t
+t/99-unix-text.t
+t/99-versions.t
 t/embedded-WWW-Mechanize-FormFiller-Value-Callback.t
 t/embedded-WWW-Mechanize-FormFiller-Value-Default.t
 t/embedded-WWW-Mechanize-FormFiller-Value-Fixed.t

Modified: branches/upstream/libwww-mechanize-formfiller-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-formfiller-perl/current/META.yml?rev=33857&op=diff
==============================================================================
--- branches/upstream/libwww-mechanize-formfiller-perl/current/META.yml (original)
+++ branches/upstream/libwww-mechanize-formfiller-perl/current/META.yml Fri Apr 24 09:15:29 2009
@@ -1,16 +1,24 @@
 --- #YAML:1.0
-name:                WWW-Mechanize-FormFiller
-version:             0.08
-abstract:            framework to automate HTML forms
-license:             ~
-generated_by:        ExtUtils::MakeMaker version 6.36_01
-distribution_type:   module
-requires:     
-    Data::Random:                  0.05
-    HTML::Form:                    
-    Test::More:                    
-meta-spec:
-    url:     http://module-build.sourceforge.net/META-spec-v1.2.html
-    version: 1.2
+name:               WWW-Mechanize-FormFiller
+version:            0.09
+abstract:           framework to automate HTML forms
 author:
     - Max Maischein <corion at cpan.org>
+license:            unknown
+distribution_type:  module
+configure_requires:
+    ExtUtils::MakeMaker:  0
+build_requires:
+    ExtUtils::MakeMaker:  0
+requires:
+    Data::Random:  0.05
+    HTML::Form:    ~
+    Test::More:    ~
+no_index:
+    directory:
+        - t
+        - inc
+generated_by:       ExtUtils::MakeMaker version 6.50
+meta-spec:
+    url:      http://module-build.sourceforge.net/META-spec-v1.4.html
+    version:  1.4

Modified: branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller.pm?rev=33857&op=diff
==============================================================================
--- branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller.pm (original)
+++ branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller.pm Fri Apr 24 09:15:29 2009
@@ -4,7 +4,7 @@
 
 use vars qw( $VERSION @ISA );
 
-$VERSION = '0.08';
+$VERSION = '0.09';
 @ISA = ();
 
 sub load_value_class {

Modified: branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value.pm?rev=33857&op=diff
==============================================================================
--- branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value.pm (original)
+++ branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value.pm Fri Apr 24 09:15:29 2009
@@ -1,7 +1,7 @@
 package WWW::Mechanize::FormFiller::Value;
 
 use vars qw( $VERSION @ISA );
-$VERSION = '0.04';
+$VERSION = '0.09';
 @ISA = ();
 
 sub new {

Modified: branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Callback.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Callback.pm?rev=33857&op=diff
==============================================================================
--- branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Callback.pm (original)
+++ branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Callback.pm Fri Apr 24 09:15:29 2009
@@ -3,7 +3,7 @@
 use strict;
 
 use vars qw( $VERSION );
-$VERSION = '0.04';
+$VERSION = '0.09';
 
 sub new {
   my ($class,$name,$coderef) = @_;

Modified: branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Default.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Default.pm?rev=33857&op=diff
==============================================================================
--- branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Default.pm (original)
+++ branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Default.pm Fri Apr 24 09:15:29 2009
@@ -3,7 +3,7 @@
 use strict;
 
 use vars qw( $VERSION );
-$VERSION = '0.04';
+$VERSION = '0.09';
 
 sub new {
   my ($class,$name,$value) = @_;

Modified: branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Fixed.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Fixed.pm?rev=33857&op=diff
==============================================================================
--- branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Fixed.pm (original)
+++ branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Fixed.pm Fri Apr 24 09:15:29 2009
@@ -3,7 +3,7 @@
 use strict;
 
 use vars qw( $VERSION );
-$VERSION = '0.04';
+$VERSION = '0.09';
 
 sub new {
   my ($class,$name,$value) = @_;

Modified: branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Interactive.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Interactive.pm?rev=33857&op=diff
==============================================================================
--- branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Interactive.pm (original)
+++ branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Interactive.pm Fri Apr 24 09:15:29 2009
@@ -3,7 +3,7 @@
 use strict;
 
 use vars qw( $VERSION );
-$VERSION = '0.04';
+$VERSION = '0.09';
 
 sub new {
   my ($class,$name) = @_;

Modified: branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Keep.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Keep.pm?rev=33857&op=diff
==============================================================================
--- branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Keep.pm (original)
+++ branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Keep.pm Fri Apr 24 09:15:29 2009
@@ -3,7 +3,7 @@
 use strict;
 
 use vars qw( $VERSION );
-$VERSION = '0.04';
+$VERSION = '0.09';
 
 sub new {
   my ($class,$name,$value) = @_;

Modified: branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Random.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Random.pm?rev=33857&op=diff
==============================================================================
--- branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Random.pm (original)
+++ branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Random.pm Fri Apr 24 09:15:29 2009
@@ -4,7 +4,7 @@
 use Data::Random qw(rand_enum);
 
 use vars qw( $VERSION );
-$VERSION = '0.04';
+$VERSION = '0.09';
 
 sub new {
   my ($class,$name, at values) = @_;

Modified: branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Random/Chars.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Random/Chars.pm?rev=33857&op=diff
==============================================================================
--- branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Random/Chars.pm (original)
+++ branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Random/Chars.pm Fri Apr 24 09:15:29 2009
@@ -4,7 +4,7 @@
 
 use vars qw( $VERSION );
 use Data::Random qw(rand_chars);
-$VERSION = '0.05';
+$VERSION = '0.09';
 
 sub new {
   my ($class,$name, at args) = @_;

Modified: branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Random/Date.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Random/Date.pm?rev=33857&op=diff
==============================================================================
--- branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Random/Date.pm (original)
+++ branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Random/Date.pm Fri Apr 24 09:15:29 2009
@@ -4,7 +4,7 @@
 
 use vars qw( $VERSION );
 use POSIX;
-$VERSION = '0.04';
+$VERSION = '0.09';
 
 sub new {
   my ($class,$name,%args) = @_;

Modified: branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Random/Word.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Random/Word.pm?rev=33857&op=diff
==============================================================================
--- branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Random/Word.pm (original)
+++ branches/upstream/libwww-mechanize-formfiller-perl/current/lib/WWW/Mechanize/FormFiller/Value/Random/Word.pm Fri Apr 24 09:15:29 2009
@@ -3,7 +3,7 @@
 
 use vars qw( $VERSION );
 use Data::Random qw(rand_words);
-$VERSION = '0.04';
+$VERSION = '0.09';
 
 sub new {
   my ($class,$name, at args) = @_;

Modified: branches/upstream/libwww-mechanize-formfiller-perl/current/t/04-FF-api.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-formfiller-perl/current/t/04-FF-api.t?rev=33857&op=diff
==============================================================================
--- branches/upstream/libwww-mechanize-formfiller-perl/current/t/04-FF-api.t (original)
+++ branches/upstream/libwww-mechanize-formfiller-perl/current/t/04-FF-api.t Fri Apr 24 09:15:29 2009
@@ -125,4 +125,4 @@
   $f = WWW::Mechanize::FormFiller->fillout(name => [ Random => 'Mark' ], $form);
   isa_ok($f,'WWW::Mechanize::FormFiller');
   is($form->value('name'),'Mark','The place of $form is irrelevant');
-};
+};

Added: branches/upstream/libwww-mechanize-formfiller-perl/current/t/99-manifest.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-formfiller-perl/current/t/99-manifest.t?rev=33857&op=file
==============================================================================
--- branches/upstream/libwww-mechanize-formfiller-perl/current/t/99-manifest.t (added)
+++ branches/upstream/libwww-mechanize-formfiller-perl/current/t/99-manifest.t Fri Apr 24 09:15:29 2009
@@ -1,0 +1,34 @@
+use strict;
+use Test::More;
+
+# Check that MANIFEST and MANIFEST.skip are sane :
+
+use File::Find;
+use File::Spec;
+
+my @files = qw( MANIFEST MANIFEST.skip );
+plan tests => scalar @files * 4 +1;
+
+for my $file (@files) {
+  ok(-f $file, "$file exists");
+  open F, "<$file"
+    or die "Couldn't open $file : $!";
+  my @lines = <F>;
+  is_deeply([grep(/^$/, @lines)],[], "No empty lines in $file");
+  is_deeply([grep(/^\s+$/, @lines)],[], "No whitespace-only lines in $file");
+  is_deeply([grep(/^\s*\S\s+$/, @lines)],[],"No trailing whitespace on lines in $file");
+  close F;
+};
+
+# Now, check that all files matching 't/*.t' (recursively) are in the manifest:
+open my $manifest, "<", "MANIFEST"
+    or die "Couldn't read MANIFEST: $!";
+my %manifest = map { chomp; $_ => 1 } <$manifest>;
+my @unknown_tests;
+find(sub{ 
+    push @unknown_tests, $File::Find::name 
+        if /\.t$/i and ! $manifest{ $File::Find::name }
+}, 't');
+if (! is_deeply( \@unknown_tests, [], 'No test files left out of MANIFEST')) {
+    diag "Missing from MANIFEST: $_" for @unknown_tests;
+};

Propchange: branches/upstream/libwww-mechanize-formfiller-perl/current/t/99-manifest.t
------------------------------------------------------------------------------
    svn:executable = *

Modified: branches/upstream/libwww-mechanize-formfiller-perl/current/t/99-pod.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-formfiller-perl/current/t/99-pod.t?rev=33857&op=diff
==============================================================================
--- branches/upstream/libwww-mechanize-formfiller-perl/current/t/99-pod.t (original)
+++ branches/upstream/libwww-mechanize-formfiller-perl/current/t/99-pod.t Fri Apr 24 09:15:29 2009
@@ -1,36 +1,36 @@
-use Test::More;
-
-# Check our Pod
-# The test was provided by Andy Lester,
-# who stole it from Brian D. Foy
-# Thanks to both !
-
-use File::Spec;
-use File::Find;
-use strict;
-
-eval {
-  require Test::Pod;
-  Test::Pod->import;
-};
-
-my @files;
-
-if ($@) {
-  plan skip_all => "Test::Pod required for testing POD";
-}
-elsif ($Test::Pod::VERSION < 0.95) {
-  plan skip_all => "Test::Pod 0.95 required for testing POD";
-}
-else {
-  my $blib = File::Spec->catfile(qw(blib lib));
-  find(\&wanted, $blib);
-  plan tests => scalar @files;
-  foreach my $file (@files) {
-    pod_file_ok($file);
-  }
-}
-
-sub wanted {
-  push @files, $File::Find::name if /\.p(l|m|od)$/;
-}
+use Test::More;
+
+# Check our Pod
+# The test was provided by Andy Lester,
+# who stole it from Brian D. Foy
+# Thanks to both !
+
+use File::Spec;
+use File::Find;
+use strict;
+
+eval {
+  require Test::Pod;
+  Test::Pod->import;
+};
+
+my @files;
+
+if ($@) {
+  plan skip_all => "Test::Pod required for testing POD";
+}
+elsif ($Test::Pod::VERSION < 0.95) {
+  plan skip_all => "Test::Pod 0.95 required for testing POD";
+}
+else {
+  my $blib = File::Spec->catfile(qw(blib lib));
+  find(\&wanted, $blib);
+  plan tests => scalar @files;
+  foreach my $file (@files) {
+    pod_file_ok($file);
+  }
+}
+
+sub wanted {
+  push @files, $File::Find::name if /\.p(l|m|od)$/;
+}

Added: branches/upstream/libwww-mechanize-formfiller-perl/current/t/99-todo.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-formfiller-perl/current/t/99-todo.t?rev=33857&op=file
==============================================================================
--- branches/upstream/libwww-mechanize-formfiller-perl/current/t/99-todo.t (added)
+++ branches/upstream/libwww-mechanize-formfiller-perl/current/t/99-todo.t Fri Apr 24 09:15:29 2009
@@ -1,0 +1,42 @@
+use Test::More;
+use File::Spec;
+use File::Find;
+use strict;
+
+# Check that all files do not contain any
+# lines with "XXX" - such markers should
+# either have been converted into Todo-stuff
+# or have been resolved.
+# The test was provided by Andy Lester.
+
+my @files;
+my $blib = File::Spec->catfile(qw(blib lib));
+find(\&wanted, $blib);
+plan tests => scalar @files;
+foreach my $file (@files) {
+  source_file_ok($file);
+}
+
+sub wanted {
+  push @files, $File::Find::name if /\.p(l|m|od)$/;
+}
+
+sub source_file_ok {
+    my $file = shift;
+
+    open( my $fh, "<$file" ) or die "Can't open $file: $!";
+    my @lines = <$fh>;
+    close $fh;
+
+    my $n = 0;
+    for ( @lines ) {
+        ++$n;
+        s/^/$file ($n): /;
+    }
+
+    my @x = grep /XXX/, @lines;
+
+    if ( !is( scalar @x, 0, "Looking for XXXes in $file" ) ) {
+        diag( $_ ) for @x;
+    }
+}

Propchange: branches/upstream/libwww-mechanize-formfiller-perl/current/t/99-todo.t
------------------------------------------------------------------------------
    svn:executable = *

Added: branches/upstream/libwww-mechanize-formfiller-perl/current/t/99-unix-text.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-formfiller-perl/current/t/99-unix-text.t?rev=33857&op=file
==============================================================================
--- branches/upstream/libwww-mechanize-formfiller-perl/current/t/99-unix-text.t (added)
+++ branches/upstream/libwww-mechanize-formfiller-perl/current/t/99-unix-text.t Fri Apr 24 09:15:29 2009
@@ -1,0 +1,37 @@
+use Test::More;
+
+# Check that all released module files are in
+# UNIX text format
+
+use File::Spec;
+use File::Find;
+use strict;
+
+my @files;
+
+my $blib = File::Spec->catfile(qw(blib lib));
+find(\&wanted, $blib);
+plan tests => scalar @files;
+foreach my $file (@files) {
+  unix_file_ok($file);
+}
+
+sub wanted {
+  push @files, $File::Find::name if /\.p(l|m|od)$/;
+}
+
+sub unix_file_ok {
+  my ($filename) = @_;
+  local $/;
+  open F, "< $filename"
+    or die "Couldn't open '$filename' : $!\n";
+  binmode F;
+  my $content = <F>;
+
+  my $i;
+  my @lines = grep { /\x0D\x0A$/sm } map { sprintf "%s: %s\x0A", $i++, $_ } split /\x0A/, $content;
+  unless (is(scalar @lines, 0,"'$filename' contains no windows newlines")) {
+    diag $_ for @lines;
+  };
+  close F;
+};

Propchange: branches/upstream/libwww-mechanize-formfiller-perl/current/t/99-unix-text.t
------------------------------------------------------------------------------
    svn:executable = *

Added: branches/upstream/libwww-mechanize-formfiller-perl/current/t/99-versions.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libwww-mechanize-formfiller-perl/current/t/99-versions.t?rev=33857&op=file
==============================================================================
--- branches/upstream/libwww-mechanize-formfiller-perl/current/t/99-versions.t (added)
+++ branches/upstream/libwww-mechanize-formfiller-perl/current/t/99-versions.t Fri Apr 24 09:15:29 2009
@@ -1,0 +1,49 @@
+#!perl -w
+
+# Stolen from ChrisDolan on use.perl.org
+# http://use.perl.org/comments.pl?sid=29264&cid=44309
+
+use warnings;
+use strict;
+use File::Find;
+use Test::More;
+BEGIN {
+    eval 'use File::Slurp; 1';
+    if ($@) {
+        plan skip_all => "File::Slurp needed for testing";
+        exit 0;
+    };
+};
+
+plan 'no_plan';
+
+my $last_version = undef;
+
+sub check {
+      return if (! m{blib/script/}xms && ! m{\.pm \z}xms);
+
+      my $content = read_file($_);
+
+      # only look at perl scripts, not sh scripts
+      return if (m{blib/script/}xms && $content !~ m/\A \#![^\r\n]+?perl/xms);
+
+      my @version_lines = $content =~ m/ ( [^\n]* \$VERSION \s* = [^=] [^\r\n]* ) /gxms;
+      if (@version_lines == 0) {
+            fail($_);
+      }
+      for my $line (@version_lines) {
+            if (!defined $last_version) {
+                  $last_version = shift @version_lines;
+                  diag "Checking for $last_version";
+                  pass($_);
+            } else {
+                  is($line, $last_version, $_);
+            }
+      }
+}
+
+find({wanted => \&check, no_chdir => 1}, 'blib');
+
+if (! defined $last_version) {
+      fail('Failed to find any files with $VERSION');
+}

Propchange: branches/upstream/libwww-mechanize-formfiller-perl/current/t/99-versions.t
------------------------------------------------------------------------------
    svn:executable = *




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