From 58389ed28d97caddc55b782fd9ebca329852f29d Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Mon, 20 Nov 2006 09:54:10 +0000 Subject: Update Text::Tabs and Text::Wrap to version 2006.1117 p4raw-id: //depot/perl@29320 --- lib/Text/Tabs.pm | 9 ++------- lib/Text/TabsWrap/CHANGELOG | 9 +++++++++ lib/Text/TabsWrap/t/Jacobson.t | 24 ++++++++++++++++++++++++ lib/Text/TabsWrap/t/Jacobson2.t | 22 ++++++++++++++++++++++ lib/Text/TabsWrap/t/tabs.t | 13 ++++--------- lib/Text/TabsWrap/t/wrap.t | 29 ++++------------------------- lib/Text/Wrap.pm | 5 +++-- 7 files changed, 68 insertions(+), 43 deletions(-) create mode 100644 lib/Text/TabsWrap/t/Jacobson.t create mode 100644 lib/Text/TabsWrap/t/Jacobson2.t (limited to 'lib/Text') diff --git a/lib/Text/Tabs.pm b/lib/Text/Tabs.pm index ab54c7724f..610e870c11 100644 --- a/lib/Text/Tabs.pm +++ b/lib/Text/Tabs.pm @@ -3,11 +3,11 @@ package Text::Tabs; require Exporter; -@ISA = qw(Exporter); +@ISA = (Exporter); @EXPORT = qw(expand unexpand $tabstop); use vars qw($VERSION $tabstop $debug); -$VERSION = 2007.0711_01; +$VERSION = 2007.1117; use strict; @@ -127,11 +127,6 @@ Instead of the C command, use: perl -MText::Tabs -n -e 'print unexpand $_' -=head1 BUGS - -expand doesn't handle newlines very quickly -- do not feed it an -entire document in one string. Instead feed it an array of lines. - =head1 LICENSE Copyright (C) 1996-2002,2005,2006 David Muir Sharnoff. diff --git a/lib/Text/TabsWrap/CHANGELOG b/lib/Text/TabsWrap/CHANGELOG index f82e58479f..8d4171e87d 100644 --- a/lib/Text/TabsWrap/CHANGELOG +++ b/lib/Text/TabsWrap/CHANGELOG @@ -1,3 +1,12 @@ + +Use warnings::warnif instead of just warn for columns < 2. Appled per +request of Rafael Garcia-Suarez . + += 2006/11/17 + +Text::Tabs can handle newlines now so the BUGS section has been removed +per request from Aristotle Pagaltzis. + = 2006/07/11 Further bomb-proofing to pass more tests: Dan Jacobson + +use Text::Wrap qw(wrap $columns $huge $break); + +print "1..1\n"; + +$huge='overflow'; +$Text::Wrap::columns=9; +$break="(?<=[,.])"; +eval { +$a=wrap('','', +"mmmm,n,ooo,ppp.qqqq.rrrrr,sssssssssssss,ttttttttt,uu,vvv wwwwwwwww####\n"); +}; + +if ($@) { + my $e = $@; + $e =~ s/^/# /gm; + print $e; +} +print $@ ? "not ok 1\n" : "ok 1\n"; + + diff --git a/lib/Text/TabsWrap/t/Jacobson2.t b/lib/Text/TabsWrap/t/Jacobson2.t new file mode 100644 index 0000000000..5874e0ecb2 --- /dev/null +++ b/lib/Text/TabsWrap/t/Jacobson2.t @@ -0,0 +1,22 @@ +#!/usr/bin/perl -I. + +use Text::Wrap qw(wrap $columns $huge $break); + +print "1..1\n"; + +$huge='overflow'; +$Text::Wrap::columns=9; +$break="(?<=[,.])"; +eval { +$a=wrap('','', +"mmmm,n,ooo,ppp.qqqq.rrrrr.adsljasdf\nlasjdflajsdflajsdfljasdfl\nlasjdflasjdflasf,sssssssssssss,ttttttttt,uu,vvv wwwwwwwww####\n"); +}; + +if ($@) { + my $e = $@; + $e =~ s/^/# /gm; + print $e; +} +print $@ ? "not ok 1\n" : "ok 1\n"; + + diff --git a/lib/Text/TabsWrap/t/tabs.t b/lib/Text/TabsWrap/t/tabs.t index 2856aff75b..1bba9a63e2 100755 --- a/lib/Text/TabsWrap/t/tabs.t +++ b/lib/Text/TabsWrap/t/tabs.t @@ -1,9 +1,4 @@ -#!./perl -w - -BEGIN { - chdir 't' if -d 't'; - @INC = '../lib'; -} +#!/usr/old/bin/perl5.004_01 -w @tests = (split(/\nEND\n/s, <