aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorGravatar Steven Schubiger <stsc@refcnt.org> 2019-09-21 22:25:53 +0200
committerGravatar Steven Schubiger <stsc@refcnt.org> 2019-09-21 22:25:53 +0200
commit6f9428b6c49ad3b8e33a2baab20d00fa8233375e (patch)
tree8baff3bcdeca066f82514834d389537d6bf90b97 /t
parent5b95cbb5d556b46825d76d4e46925ffa945faa24 (diff)
downloadcolorize-6f9428b6c49ad3b8e33a2baab20d00fa8233375e.tar.gz
colorize-6f9428b6c49ad3b8e33a2baab20d00fa8233375e.tar.bz2
Fix using color from config with hyphen
Diffstat (limited to 't')
-rwxr-xr-xt/conf/color.t5
1 files changed, 3 insertions, 2 deletions
diff --git a/t/conf/color.t b/t/conf/color.t
index 3adfd5b..fc3ab71 100755
--- a/t/conf/color.t
+++ b/t/conf/color.t
@@ -8,7 +8,7 @@ use Colorize::Common qw(:defaults $write_to_tmpfile);
use File::Temp qw(tmpnam);
use Test::More;
-my $tests = 3;
+my $tests = 4;
plan tests => $tests;
@@ -24,7 +24,8 @@ SKIP: {
print {$fh} "color=green\n";
close($fh);
- is(qx($program $infile), "\e[32mfoo\e[0m", 'color from config');
+ is(qx(printf %s "foo" | $program -), "\e[32mfoo\e[0m", 'color from config (stdin)');
+ is(qx($program $infile), "\e[32mfoo\e[0m", 'color from config (file)');
is(qx(printf %s "foo" | $program none/none), 'foo', 'read from stdin');
is(qx($program none/none $infile), 'foo', 'read from file');