]> git.refcnt.org Git - colorize.git/commitdiff
Tighten scope of test
authorSteven Schubiger <stsc@refcnt.org>
Thu, 4 Jul 2013 09:12:45 +0000 (11:12 +0200)
committerSteven Schubiger <stsc@refcnt.org>
Thu, 4 Jul 2013 09:12:45 +0000 (11:12 +0200)
test.pl

diff --git a/test.pl b/test.pl
index 056f818d7b4d6d27c6649e9572fb1eb025baa4e1..a825ba769ac3ef1b2887635254f6712272f2f59e 100755 (executable)
--- 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');