From 8018e45de87a4dfd0b5a52d8b40f1958fa26fd73 Mon Sep 17 00:00:00 2001 From: Steven Schubiger Date: Thu, 4 Jul 2013 11:12:45 +0200 Subject: Tighten scope of test --- test.pl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'test.pl') 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'); -- cgit v1.2.3