aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorGravatar Steven Schubiger <stsc@refcnt.org> 2019-09-01 15:51:59 +0200
committerGravatar Steven Schubiger <stsc@refcnt.org> 2019-09-01 15:51:59 +0200
commitd04e14ae7bef2af9121bc4880e36128acd3dd8ed (patch)
tree1da288757376d2e1b894562342036e1755f5c76a /t
parent31de42f6348099f80017e1b35abb407db01e6559 (diff)
downloadcolorize-d04e14ae7bef2af9121bc4880e36128acd3dd8ed.tar.gz
colorize-d04e14ae7bef2af9121bc4880e36128acd3dd8ed.tar.bz2
Add config short option -c
Diffstat (limited to 't')
-rwxr-xr-xt/conf/param.t18
1 files changed, 11 insertions, 7 deletions
diff --git a/t/conf/param.t b/t/conf/param.t
index 3fe5436..520df2b 100755
--- a/t/conf/param.t
+++ b/t/conf/param.t
@@ -8,7 +8,7 @@ use Colorize::Common qw(:defaults $write_to_tmpfile);
use File::Temp qw(tmpnam);
use Test::More;
-my $tests = 1;
+my $tests = 2;
my $conf = <<'EOT';
attr=bold
@@ -16,6 +16,14 @@ color=blue
omit-color-empty=yes
EOT
+my $expected = <<"EOT";
+\e[1;34mfoo\e[0m
+
+\e[1;34mbar\e[0m
+
+\e[1;34mbaz\e[0m
+EOT
+
plan tests => $tests;
SKIP: {
@@ -35,13 +43,9 @@ EOT
print {$fh} $conf;
close($fh);
- is(qx($program --config=$conf_file $infile), <<"EOT", 'config param');
-\e[1;34mfoo\e[0m
-
-\e[1;34mbar\e[0m
+ is(qx($program -c $conf_file $infile), $expected, 'short option');
+ is(qx($program --config=$conf_file $infile), $expected, 'long option');
-\e[1;34mbaz\e[0m
-EOT
unlink $program;
unlink $conf_file;
}