From: Rafael Garcia-Suarez Date: Fri, 20 Feb 2004 08:21:47 +0000 (+0000) Subject: Upgrade to Term::ANSIColor 1.08. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2e589669eafeeb5926172d4cb6ac6bed09c991ce;p=p5sagit%2Fp5-mst-13.2.git Upgrade to Term::ANSIColor 1.08. p4raw-id: //depot/perl@22345 --- diff --git a/lib/Term/ANSIColor.pm b/lib/Term/ANSIColor.pm index 2233d77..e46c9c5 100644 --- a/lib/Term/ANSIColor.pm +++ b/lib/Term/ANSIColor.pm @@ -1,5 +1,5 @@ # Term::ANSIColor -- Color screen output using ANSI escape sequences. -# $Id: ANSIColor.pm,v 1.7 2003/03/26 07:00:51 eagle Exp $ +# $Id: ANSIColor.pm,v 1.8 2004/02/20 06:21:26 eagle Exp $ # # Copyright 1996, 1997, 1998, 2000, 2001, 2002 # by Russ Allbery and Zenin @@ -25,16 +25,16 @@ use Exporter (); @ISA = qw(Exporter); @EXPORT = qw(color colored); @EXPORT_OK = qw(uncolor); -%EXPORT_TAGS = (constants => [qw(CLEAR RESET BOLD UNDERLINE UNDERSCORE BLINK - REVERSE CONCEALED BLACK RED GREEN YELLOW - BLUE MAGENTA CYAN WHITE ON_BLACK ON_RED - ON_GREEN ON_YELLOW ON_BLUE ON_MAGENTA +%EXPORT_TAGS = (constants => [qw(CLEAR RESET BOLD DARK UNDERLINE UNDERSCORE + BLINK REVERSE CONCEALED BLACK RED GREEN + YELLOW BLUE MAGENTA CYAN WHITE ON_BLACK + ON_RED ON_GREEN ON_YELLOW ON_BLUE ON_MAGENTA ON_CYAN ON_WHITE)]); Exporter::export_ok_tags ('constants'); # Don't use the CVS revision as the version, since this module is also in Perl # core and too many things could munge CVS magic revision strings. -$VERSION = 1.07; +$VERSION = 1.08; ############################################################################## # Internal data structures @@ -275,9 +275,9 @@ feature. Alternately, if you import C<:constants>, you can use the constants CLEAR, RESET, BOLD, DARK, UNDERLINE, UNDERSCORE, BLINK, REVERSE, CONCEALED, BLACK, -RED, GREEN, YELLOW, BLUE, MAGENTA, ON_BLACK, ON_RED, ON_GREEN, ON_YELLOW, -ON_BLUE, ON_MAGENTA, ON_CYAN, and ON_WHITE directly. These are the same as -color('attribute') and can be used if you prefer typing: +RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE, ON_BLACK, ON_RED, ON_GREEN, +ON_YELLOW, ON_BLUE, ON_MAGENTA, ON_CYAN, and ON_WHITE directly. These are +the same as color('attribute') and can be used if you prefer typing: print BOLD BLUE ON_WHITE "Text\n", RESET; diff --git a/lib/Term/ANSIColor/ChangeLog b/lib/Term/ANSIColor/ChangeLog index a89485c..a5d95ff 100644 --- a/lib/Term/ANSIColor/ChangeLog +++ b/lib/Term/ANSIColor/ChangeLog @@ -1,3 +1,11 @@ +2004-02-19 Russ Allbery + + * ANSIColor.pm: Version 1.08 released. + + * ANSIColor.pm: Add DARK to %EXPORT_TAGS and add CYAN and WHITE to + the list of documented constants. + * test.pl: Add a test for DARK. Redo the leading comment. + 2003-03-25 Russ Allbery * ANSIColor.pm: Version 1.07 released. diff --git a/lib/Term/ANSIColor/README b/lib/Term/ANSIColor/README index fa21f99..8b9c2ad 100644 --- a/lib/Term/ANSIColor/README +++ b/lib/Term/ANSIColor/README @@ -1,4 +1,4 @@ - Term::ANSIColor version 1.07 + Term::ANSIColor version 1.08 (A simple ANSI text attribute control module) Copyright 1996, 1997, 1998, 2000, 2001, 2002 @@ -87,4 +87,7 @@ THANKS To ATricket for the information about what PuTTY, Windows telnet, and OpenSSH under Cygwin support. + To Richard Maus for pointing out DARK was missing from the exported + constants list and CYAN and WHITE were missing from the documentation. + To Larry Wall, as always, for Perl. diff --git a/lib/Term/ANSIColor/test.pl b/lib/Term/ANSIColor/test.pl index d97bde1..b9d4b18 100755 --- a/lib/Term/ANSIColor/test.pl +++ b/lib/Term/ANSIColor/test.pl @@ -1,12 +1,16 @@ -# Test suite for the Term::ANSIColor Perl module. Before `make install' is -# performed this script should be runnable with `make test'. After `make -# install' it should work as `perl test.pl'. +#!/usr/bin/perl +# $Id: test.pl,v 1.3 2004/02/20 06:21:26 eagle Exp $ +# +# test.pl -- Test suite for the Term::ANSIColor Perl module. +# +# Before "make install" is performed this script should be runnable with "make +# test". After "make install" it should work as "perl test.pl". ############################################################################ # Ensure module can be loaded ############################################################################ -BEGIN { $| = 1; print "1..12\n" } +BEGIN { $| = 1; print "1..13\n" } END { print "not ok 1\n" unless $loaded } delete $ENV{ANSI_COLORS_DISABLED}; use Term::ANSIColor qw(:constants color colored uncolor); @@ -102,3 +106,11 @@ if (GREEN 'testing' eq 'testing') { } else { print "not ok 12\n"; } +delete $ENV{ANSI_COLORS_DISABLED}; + +# Make sure DARK is exported. This was omitted in versions prior to 1.07. +if (DARK "testing" eq "\e[2mtesting\e[0m") { + print "ok 13\n"; +} else { + print "not ok 13\n"; +}