SKIP in run_multiple_progs() was parsed but unimplemented, implement it
authorTony Cook <tony@develop-help.com>
Mon, 17 Dec 2012 09:05:56 +0000 (20:05 +1100)
committerTony Cook <tony@develop-help.com>
Mon, 17 Dec 2012 09:05:56 +0000 (20:05 +1100)
t/test.pl

index c4e6fd1..e141b91 100644 (file)
--- a/t/test.pl
+++ b/t/test.pl
@@ -985,6 +985,7 @@ sub run_multiple_progs {
 
     my $tmpfile = tempfile();
 
+  PROGRAM:
     for (@prgs){
        unless (/\n/) {
            print "# From $_\n";
@@ -1011,11 +1012,20 @@ sub run_multiple_progs {
                $reason{$what} = $temp;
            }
        }
+
        my $name = '';
        if ($prog =~ s/^#\s*NAME\s+(.+)\n//m) {
            $name = $1;
        }
 
+       if ($reason{skip}) {
+       SKIP:
+         {
+           skip($name ? "$name - $reason{skip}" : $reason{skip}, 1);
+         }
+         next PROGRAM;
+       }
+
        if ($prog =~ /--FILE--/) {
            my @files = split(/\n?--FILE--\s*([^\s\n]*)\s*\n/, $prog) ;
            shift @files ;