diff options
author | Steven Schubiger <stsc@refcnt.org> | 2020-05-28 22:31:39 +0200 |
---|---|---|
committer | Steven Schubiger <stsc@refcnt.org> | 2020-05-28 22:31:39 +0200 |
commit | de43ee678c8b820dc190b312c4fa62cdb98bbcc8 (patch) | |
tree | 3c839947458638ef871cfaa7daa5c64067b7e142 | |
parent | fc006bdb885917a52eab3f343dc952910f1cba18 (diff) | |
download | colorize-de43ee678c8b820dc190b312c4fa62cdb98bbcc8.tar.gz colorize-de43ee678c8b820dc190b312c4fa62cdb98bbcc8.tar.bz2 |
Test purposeless switches with --clean[-all]
-rwxr-xr-x | test.pl | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -13,7 +13,7 @@ use Getopt::Long qw(:config no_auto_abbrev no_ignore_case); use Test::Harness qw(runtests); use Test::More; -my $tests = 30; +my $tests = 32; my $valgrind_cmd = ''; { @@ -98,6 +98,14 @@ SKIP: { } ok(qx(printf %s "\e[\e[33m" | $valgrind_cmd$program $switch) eq "\e[", "$type with invalid sequence"); + + { + my $ok = true; + foreach my $option (qw(--attr=bold --exclude-random=black --omit-color-empty)) { + $ok &= qx($valgrind_cmd$program $option $switch $infile1 2>&1 >/dev/null) =~ /switch has no meaning with/; + } + ok($ok, "$type strict options"); + } }; $check_clean->($_) foreach qw(clean clean-all); |