From 6f9428b6c49ad3b8e33a2baab20d00fa8233375e Mon Sep 17 00:00:00 2001 From: Steven Schubiger Date: Sat, 21 Sep 2019 22:25:53 +0200 Subject: Fix using color from config with hyphen --- t/conf/color.t | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 't') 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'); -- cgit v1.2.3