From d04e14ae7bef2af9121bc4880e36128acd3dd8ed Mon Sep 17 00:00:00 2001 From: Steven Schubiger Date: Sun, 1 Sep 2019 15:51:59 +0200 Subject: Add config short option -c --- t/conf/param.t | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 't') 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; } -- cgit v1.2.3