]>
git.refcnt.org Git - colorize.git/blob - t/conf/attr_clear.t
7 use Colorize
::Common
qw(:defaults $write_to_tmpfile);
8 use File::Temp qw(tmpnam);
16 my $program = tmpnam
();
17 my $conf_file = tmpnam
();
19 skip
'compiling failed (attr clear)', $tests unless system(qq($compiler -DTEST
-DCONF_FILE_TEST
=\"$conf_file\" -o
$program $source)) == 0;
21 my $infile = $write_to_tmpfile->('foo');
23 open(my $fh, '>', $conf_file) or die "Cannot open `$conf_file' for writing: $!\n";
24 print {$fh} "attr=blink\n";
27 is
(qx($program default --attr
=bold
$infile), "\e[1;39mfoo\e[0m", 'discard conf attr string');