2 # Copyright (C) 2007-2008 Parrot Foundation.
7 use lib qw( . lib ../lib ../../lib );
9 use ExtUtils::Manifest qw(maniread);
12 use Parrot::Config qw(%PConfig);
16 t/examples/catchall.t - Verify all example code at least compiles
20 % prove t/examples/catchall.t
24 Verify compilation of all examples that aren't explicitly tested by other
25 tests. No guarantee is made that these examples I<work>, just that they
30 my $manifest = maniread('MANIFEST');
32 foreach my $file (keys %$manifest) {
33 next unless $file =~ m{^examples/.*(pir|pasm)$};
34 next if $file =~ m{^examples/tutorial}; # all are tested in tutorial.t
35 next if $file =~ m{^examples/pir/befunge}; # language, not testable here
36 next if $file =~ m{^examples/languages}; # language, not testable here
37 next if $file =~ m{^examples/opengl}; # depends on OpenGL install
38 next if $file =~ m{^examples/nci/sdl}; # depends on SDL install
39 next if $file =~ m{^examples/nci/xlib}; # depends on libX11 install
43 plan tests => scalar keys %files;
45 foreach my $file (sort keys %files) {
46 my $cmd = File::Spec->curdir() . $PConfig{slash} .
47 $PConfig{test_prog} . " -o " . File::Spec->devnull() . " " .
50 is(system($cmd), 0 , $file);
55 # cperl-indent-level: 4
58 # vim: expandtab shiftwidth=4: