From: Steven Schubiger Date: Thu, 4 Jul 2013 09:12:45 +0000 (+0200) Subject: Tighten scope of test X-Git-Tag: v0.51~8 X-Git-Url: http://git.refcnt.org/?a=commitdiff_plain;h=8018e45de87a4dfd0b5a52d8b40f1958fa26fd73;hp=bc00d671241fb5509b81a13efdf50cae616610d0;p=colorize.git Tighten scope of test --- diff --git a/test.pl b/test.pl index 056f818..a825ba7 100755 --- a/test.pl +++ b/test.pl @@ -102,10 +102,12 @@ SKIP: { is_deeply([split /\n/, qx(cat $infile2 | $program none/none)], [split /\n/, $repeated], "read ${\length $repeated} bytes (BUF_SIZE=$BUF_SIZE{normal})"); - my $colored_text = qx(echo "foo bar baz" | $program red); - my $sequences = 0; - $sequences++ while $colored_text =~ /\e\[\d+m/g; - is($sequences, 2, 'count of sequences printed'); + { + my $colored_text = qx(echo "foo bar baz" | $program red); + my $sequences = 0; + $sequences++ while $colored_text =~ /\e\[\d+m/g; + is($sequences, 2, 'count of sequences printed'); + } is(qx(echo -n "hello\nworld\r\n" | $program none/none), "hello\nworld\r\n", 'stream mode');