r76483 - in /branches/upstream/libtest-inter-perl/current: Build.PL ChangeLog META.yml Makefile.PL README TODO examples/use_ok lib/Test/Inter.pm lib/Test/Inter.pod t/require_ok.t t/use_ok.1.t t/use_ok.2.t t/use_ok.3.t

mxey-guest at users.alioth.debian.org mxey-guest at users.alioth.debian.org
Fri Jun 24 18:42:56 UTC 2011


Author: mxey-guest
Date: Fri Jun 24 18:42:54 2011
New Revision: 76483

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=76483
Log:
[svn-upgrade] new version libtest-inter-perl (1.02)

Modified:
    branches/upstream/libtest-inter-perl/current/Build.PL
    branches/upstream/libtest-inter-perl/current/ChangeLog
    branches/upstream/libtest-inter-perl/current/META.yml
    branches/upstream/libtest-inter-perl/current/Makefile.PL
    branches/upstream/libtest-inter-perl/current/README
    branches/upstream/libtest-inter-perl/current/TODO
    branches/upstream/libtest-inter-perl/current/examples/use_ok
    branches/upstream/libtest-inter-perl/current/lib/Test/Inter.pm
    branches/upstream/libtest-inter-perl/current/lib/Test/Inter.pod
    branches/upstream/libtest-inter-perl/current/t/require_ok.t
    branches/upstream/libtest-inter-perl/current/t/use_ok.1.t
    branches/upstream/libtest-inter-perl/current/t/use_ok.2.t
    branches/upstream/libtest-inter-perl/current/t/use_ok.3.t

Modified: branches/upstream/libtest-inter-perl/current/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-inter-perl/current/Build.PL?rev=76483&op=diff
==============================================================================
--- branches/upstream/libtest-inter-perl/current/Build.PL (original)
+++ branches/upstream/libtest-inter-perl/current/Build.PL Fri Jun 24 18:42:54 2011
@@ -8,20 +8,17 @@
                  'IO::File'                 => '0',
                );
 my %build_mods = (
-                 'Test::Pod'                => '0',
-                 'Test::Pod::Coverage'      => '0',
                );
 
 
 my $build = Module::Build->new(
         license            => 'perl',
-        dist_version       => '1.01',
+        dist_version       => '1.02',
         dist_author        => 'Sullivan Beck <sbeck at cpan.org>',
         module_name        => 'Test::Inter',
         dist_abstract      => 'framework for more readable interactive test scripts',
         requires           => \%requires,
-        build_requires     => {},
-        build_recommends   => \%build_mods,
+        build_requires     => \%build_mods,
         sign               => 1,
 );
 

Modified: branches/upstream/libtest-inter-perl/current/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-inter-perl/current/ChangeLog?rev=76483&op=diff
==============================================================================
--- branches/upstream/libtest-inter-perl/current/ChangeLog (original)
+++ branches/upstream/libtest-inter-perl/current/ChangeLog Fri Jun 24 18:42:54 2011
@@ -5,3 +5,8 @@
 Version 1.01  2010-04-29
    Use File::Basename and IO::File to get rid of two unix dependencies.
 
+Version 1.02  2011-06-23
+   Added 'width' method.
+   Updated some tests which did not run correctly with perl 5.015.  Renee Baecker
+
+Version 1.03

Modified: branches/upstream/libtest-inter-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-inter-perl/current/META.yml?rev=76483&op=diff
==============================================================================
--- branches/upstream/libtest-inter-perl/current/META.yml (original)
+++ branches/upstream/libtest-inter-perl/current/META.yml Fri Jun 24 18:42:54 2011
@@ -13,11 +13,11 @@
 provides:
   Test::Inter:
     file: lib/Test/Inter.pm
-    version: 1.01
+    version: 1.02
 requires:
   File::Basename: 0
   IO::File: 0
   perl: 5.004
 resources:
   license: http://dev.perl.org/licenses/
-version: 1.01
+version: 1.02

Modified: branches/upstream/libtest-inter-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-inter-perl/current/Makefile.PL?rev=76483&op=diff
==============================================================================
--- branches/upstream/libtest-inter-perl/current/Makefile.PL (original)
+++ branches/upstream/libtest-inter-perl/current/Makefile.PL Fri Jun 24 18:42:54 2011
@@ -6,14 +6,12 @@
 my %requires = (
                  'File::Basename'           => '0',
                  'IO::File'                 => '0',
-                 'Test::Pod'                => '0',
-                 'Test::Pod::Coverage'      => '0',
                );
 
 
 WriteMakefile(
         NAME             => 'Test::Inter',
-        VERSION          => '1.01',
+        VERSION          => '1.02',
         ($] >= 5.004
         ? (ABSTRACT=>'framework for more readable interactive test scripts',
            AUTHOR  =>'Sullivan Beck (sbeck at cpan.org)')

Modified: branches/upstream/libtest-inter-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-inter-perl/current/README?rev=76483&op=diff
==============================================================================
--- branches/upstream/libtest-inter-perl/current/README (original)
+++ branches/upstream/libtest-inter-perl/current/README Fri Jun 24 18:42:54 2011
@@ -234,6 +234,7 @@
            quiet
            mode
            skip_all
+           width
 
     version
            $o->version();
@@ -369,6 +370,19 @@
         When run in interactive mode, it prints out results in a more human
         readable format.
 
+    width
+           $o = new Test::Inter 'width' => WIDTH;
+           $o->width(WIDTH);
+
+        The width option can be set using a ('width',WIDTH) option pair, or
+        by setting the TI_WIDTH environment variable, or the $::TI_WIDTH
+        global variable.
+
+        WIDTH is the width of the terminal (for printing out failed test
+        information). It defaults to 80, but it can be set to any width (and
+        lines longer then this are truncated). If WIDTH is set to 0, no
+        truncation is done.
+
     skip_all
            $o = new Test::Inter 'skip_all' => REASON;
            $o->skip_all(REASON);
@@ -458,6 +472,9 @@
 
         If $mode is passed in, it must be either the string 'forbid' or
         'feature'.
+
+        If $mode is 'feature', a feature named $module is set if the module
+        was able to be loaded.
 
     use_ok
            $o->use_ok(@args [,$mode]);
@@ -889,7 +906,7 @@
        tests => "(a b) c"
 
     Although parens are optional, they may make things more readable, and
-    allow you to use something other than whitespsace as the delimiter.
+    allow you to use something other than whitespace as the delimiter.
 
     If the character immediately following the opening paren, brace, or
     bracket is a punctuation mark, then it is used as the delimiter instead
@@ -975,7 +992,7 @@
 
     I wrote a very basic version of my test framework which allowed me to
     write all of the tests as a string, it would parse the string, count the
-    tests, ad then run them.
+    tests, and then run them.
 
     Over the years, the functionality I wanted grew, and periodically, I'd
     go back and reexamine other Test frameworks (primarily Test::More) to

Modified: branches/upstream/libtest-inter-perl/current/TODO
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-inter-perl/current/TODO?rev=76483&op=diff
==============================================================================
--- branches/upstream/libtest-inter-perl/current/TODO (original)
+++ branches/upstream/libtest-inter-perl/current/TODO Fri Jun 24 18:42:54 2011
@@ -20,3 +20,10 @@
    Test::Slow
 to see if there's anything I want to add.
 
+Look at using Data::PrettyPrintObjects to print out the results.
+
+Add support for timing tests:
+
+   ok 1  (12 ms)
+   ok 2  (23 ms)
+

Modified: branches/upstream/libtest-inter-perl/current/examples/use_ok
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-inter-perl/current/examples/use_ok?rev=76483&op=diff
==============================================================================
--- branches/upstream/libtest-inter-perl/current/examples/use_ok (original)
+++ branches/upstream/libtest-inter-perl/current/examples/use_ok Fri Jun 24 18:42:54 2011
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use vars qw($o);
+our($o);
 
 BEGIN {
   print "The first test will fail, all others will be skipped.\n\n";

Modified: branches/upstream/libtest-inter-perl/current/lib/Test/Inter.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-inter-perl/current/lib/Test/Inter.pm?rev=76483&op=diff
==============================================================================
--- branches/upstream/libtest-inter-perl/current/lib/Test/Inter.pm (original)
+++ branches/upstream/libtest-inter-perl/current/lib/Test/Inter.pm Fri Jun 24 18:42:54 2011
@@ -12,8 +12,8 @@
 use File::Basename;
 use IO::File;
 
-use vars qw($VERSION);
-$VERSION = '1.01';
+our($VERSION);
+$VERSION = '1.02';
 
 ###############################################################################
 # BASE METHODS
@@ -49,6 +49,7 @@
                                      # (this should only be done when
                                      # running as an interactive script)
                'mode'     => 'test', # mode to run script in
+               'width'    => 80,     # width of terminal
                'features' => {},     # a list of available features
 
                'skipall'  => '',     # the reason for skipping all
@@ -66,7 +67,7 @@
 
    # Handle options, environment variables, global variables
 
-   my @opts = qw(start end testnum plan abort quiet mode skip_all);
+   my @opts = qw(start end testnum plan abort quiet mode width skip_all);
    my %o    = map { $_,1 } @opts;
 
    no strict 'refs';
@@ -209,6 +210,12 @@
    my($self,$val) = @_;
    $val = 'test'  if (! $val);
    $$self{'mode'} = $val;
+}
+
+sub width {
+   my($self,$val) = @_;
+   $val = 0  if (! $val);
+   $$self{'width'} = $val;
 }
 
 sub skip_all {
@@ -714,10 +721,16 @@
 sub _stringify {
    my($self,$s) = @_;
 
-   my($str) = $self->__stringify($s);
-   $str = substr($str,0,60)  if (length($str)>60);
+   my($str)   = $self->__stringify($s);
+   my($width) = $$self{'width'};
+   if ($width) {
+      $width -= 21;    # The leading string
+      $width  = 10  if ($width < 10);
+      $str = substr($str,0,$width)  if (length($str)>$width);
+   }
    return $str;
 }
+
 sub __stringify {
    my($self,$s) = @_;
 

Modified: branches/upstream/libtest-inter-perl/current/lib/Test/Inter.pod
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-inter-perl/current/lib/Test/Inter.pod?rev=76483&op=diff
==============================================================================
--- branches/upstream/libtest-inter-perl/current/lib/Test/Inter.pod (original)
+++ branches/upstream/libtest-inter-perl/current/lib/Test/Inter.pod Fri Jun 24 18:42:54 2011
@@ -269,6 +269,7 @@
    quiet
    mode
    skip_all
+   width
 
 =item B<version>
 
@@ -412,6 +413,20 @@
 When run in interactive mode, it prints out results in a more
 human readable format.
 
+=item B<width>
+
+   $o = new Test::Inter 'width' => WIDTH;
+   $o->width(WIDTH);
+
+The width option can be set using a ('width',WIDTH) option pair, or
+by setting the TI_WIDTH environment variable, or the $::TI_WIDTH
+global variable.
+
+WIDTH is the width of the terminal (for printing out failed test
+information). It defaults to 80, but it can be set to any width (and
+lines longer then this are truncated). If WIDTH is set to 0, no
+truncation is done.
+
 =item B<skip_all>
 
    $o = new Test::Inter 'skip_all' => REASON;
@@ -518,6 +533,9 @@
 
 If $mode is passed in, it must be either the string 'forbid' or
 'feature'.
+
+If $mode is 'feature', a feature named $module is set if the module
+was able to be loaded.
 
 =item B<use_ok>
 
@@ -691,18 +709,18 @@
 
 =over 4
 
-=item name
+=item B<name>
 
    name => NAME
 
 This sets the name of this set of tests. All tests will be given the
 same name.
 
-=item tests
-
-=item func
-
-=item expected
+=item B<tests>
+
+=item B<func>
+
+=item B<expected>
 
 In order to specify a series of tests, you have to specify either
 a function and a list of arguments, or a list of results.
@@ -726,9 +744,9 @@
 
 The way to specify these are covered in the next section SPECIFYING THE TESTS.
 
-=item feature
-
-=item disable
+=item B<feature>
+
+=item B<disable>
 
    feature => [FEATURE1, FEATURE2, ...]
 
@@ -746,13 +764,13 @@
 If the disable option is included, the tests will be run unless ANY of the features
 listed are available.
 
-=item skip
+=item B<skip>
 
    skip => REASON
 
 Skip these tests for the reason given.
 
-=item todo
+=item B<todo>
 
    todo => 0/1
 
@@ -975,7 +993,7 @@
    tests => "(a b) c"
 
 Although parens are optional, they may make things more readable, and allow
-you to use something other than whitespsace as the delimiter.
+you to use something other than whitespace as the delimiter.
 
 If the character immediately following the opening paren, brace, or
 bracket is a punctuation mark, then it is used as the delimiter
@@ -1062,7 +1080,7 @@
 
 I wrote a very basic version of my test framework which allowed me to
 write all of the tests as a string, it would parse the string, count
-the tests, ad then run them.
+the tests, and then run them.
 
 Over the years, the functionality I wanted grew, and periodically, I'd
 go back and reexamine other Test frameworks (primarily Test::More) to

Modified: branches/upstream/libtest-inter-perl/current/t/require_ok.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-inter-perl/current/t/require_ok.t?rev=76483&op=diff
==============================================================================
--- branches/upstream/libtest-inter-perl/current/t/require_ok.t (original)
+++ branches/upstream/libtest-inter-perl/current/t/require_ok.t Fri Jun 24 18:42:54 2011
@@ -7,7 +7,7 @@
 my $o = new Test::Inter;
 
 $o->require_ok('5.001');
-$o->require_ok('5.015','forbid');
+$o->require_ok('7.001','forbid');
 $o->require_ok('Config');
 $o->require_ok('Xxx::Yyy','forbid');
 $o->require_ok('Symbol','feature');

Modified: branches/upstream/libtest-inter-perl/current/t/use_ok.1.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-inter-perl/current/t/use_ok.1.t?rev=76483&op=diff
==============================================================================
--- branches/upstream/libtest-inter-perl/current/t/use_ok.1.t (original)
+++ branches/upstream/libtest-inter-perl/current/t/use_ok.1.t Fri Jun 24 18:42:54 2011
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use vars qw($o);
+our($o);
 
 BEGIN {
   use Test::Inter;

Modified: branches/upstream/libtest-inter-perl/current/t/use_ok.2.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-inter-perl/current/t/use_ok.2.t?rev=76483&op=diff
==============================================================================
--- branches/upstream/libtest-inter-perl/current/t/use_ok.2.t (original)
+++ branches/upstream/libtest-inter-perl/current/t/use_ok.2.t Fri Jun 24 18:42:54 2011
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use vars qw($o);
+our($o);
 
 BEGIN {
   use Test::Inter;

Modified: branches/upstream/libtest-inter-perl/current/t/use_ok.3.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-inter-perl/current/t/use_ok.3.t?rev=76483&op=diff
==============================================================================
--- branches/upstream/libtest-inter-perl/current/t/use_ok.3.t (original)
+++ branches/upstream/libtest-inter-perl/current/t/use_ok.3.t Fri Jun 24 18:42:54 2011
@@ -3,14 +3,14 @@
 use strict;
 use warnings;
 
-use vars qw($o);
+our($o);
 
 BEGIN {
   use Test::Inter;
   $o = new Test::Inter;
 }
 
-BEGIN { $o->use_ok('5.015','forbid'); }
+BEGIN { $o->use_ok('7.001','forbid'); }
 BEGIN { $o->use_ok('Config','xxxx','forbid'); }
 BEGIN { $o->use_ok('Storable',7.01,'dclone','forbid'); }
 




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