aboutsummaryrefslogtreecommitdiffstats
path: root/t/conf/param.t
diff options
context:
space:
mode:
Diffstat (limited to 't/conf/param.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;
}