]>
git.refcnt.org Git - colorize.git/blob - t/conf/endings.t
7 use Colorize
::Common
qw(:defaults $write_to_tmpfile);
8 use File::Temp qw(tmpnam);
21 my $program = tmpnam
();
22 my $conf_file = tmpnam
();
24 skip
'compiling failed (endings)', $tests unless system(qq($compiler -DTEST
-DCONF_FILE_TEST
=\"$conf_file\" -o
$program $source)) == 0;
26 my $infile = $write_to_tmpfile->('foo');
28 open(my $fh, '>', $conf_file) or die "Cannot open `$conf_file' for writing: $!\n";
29 print {$fh} join "\015\012", split /\n/, $conf;
32 is
(qx($program $infile), "\e[7;31mfoo\e[0m", 'CRLF line endings');