Getopt-EX
view release on metacpan or search on metacpan
t/01_colormap.t view on Meta::CPAN
delete $ENV{$_};
}
}
use Getopt::EX::Colormap qw(colorize colorize24 ansi_code);
use constant {
RESET => "\e[m\e[K",
};
sub rgb24(&) {
my $sub = shift;
local $Getopt::EX::Colormap::RGB24 = 1;
$sub->();
}
is(colorize("N", "text"), "text", "N - NOP");
is(colorize(";", "text"), "text", "; - NOP");
is(colorize("R", "text"), "\e[31m"."text".RESET, "colorize");
t/11_no_color.t view on Meta::CPAN
}
$ENV{NO_COLOR} = "1";
}
use Getopt::EX::Colormap qw(colorize colorize24 ansi_code);
use constant {
RESET => "",
};
sub rgb24(&) {
my $sub = shift;
local $Getopt::EX::Colormap::RGB24 = 1;
$sub->();
}
is(colorize("N", "text"), "text", "N - NOP");
is(colorize(";", "text"), "text", "; - NOP");
is(colorize("R", "text"), ""."text".RESET, "colorize");
( run in 0.242 second using v1.01-cache-2.11-cpan-49f99fa48dc )