summaryrefslogtreecommitdiff
path: root/lib/Term
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-02-20 08:21:47 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-02-20 08:21:47 +0000
commit2e589669eafeeb5926172d4cb6ac6bed09c991ce (patch)
treeebc98fc88022da733263f342692b9cc7158bbc73 /lib/Term
parent9b924220109ab5ca4ffe2f23c240236dc5a723c2 (diff)
downloadperl-2e589669eafeeb5926172d4cb6ac6bed09c991ce.tar.gz
Upgrade to Term::ANSIColor 1.08.
p4raw-id: //depot/perl@22345
Diffstat (limited to 'lib/Term')
-rw-r--r--lib/Term/ANSIColor.pm18
-rw-r--r--lib/Term/ANSIColor/ChangeLog8
-rw-r--r--lib/Term/ANSIColor/README5
-rwxr-xr-xlib/Term/ANSIColor/test.pl20
4 files changed, 37 insertions, 14 deletions
diff --git a/lib/Term/ANSIColor.pm b/lib/Term/ANSIColor.pm
index 2233d77917..e46c9c56c7 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 <rra@stanford.edu> and Zenin <zenin@bawdycaste.com>
@@ -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 a89485cab0..a5d95ff53e 100644
--- a/lib/Term/ANSIColor/ChangeLog
+++ b/lib/Term/ANSIColor/ChangeLog
@@ -1,3 +1,11 @@
+2004-02-19 Russ Allbery <rra@stanford.edu>
+
+ * 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 <rra@stanford.edu>
* ANSIColor.pm: Version 1.07 released.
diff --git a/lib/Term/ANSIColor/README b/lib/Term/ANSIColor/README
index fa21f99edc..8b9c2ad854 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 d97bde1a9b..b9d4b18029 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";
+}