Skip to content

Commit

Permalink
Add new test
Browse files Browse the repository at this point in the history
  • Loading branch information
Altai-man committed Feb 4, 2017
1 parent e762247 commit e842f77
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions xt/examples-compilation.t
@@ -0,0 +1,25 @@
use v6;
use Test;
use lib 'lib';
use File::Find;

# Extract examples
chdir $?FILE.IO.dirname.IO.dirname;
my $p1 = run 'make', 'extract-examples';
chdir 'examples';

my @files = find(dir => '.',
name => /'Type'|'Language' .*? .p6$/,
exclude => /'exceptions.p6'|'ArgFiles.p6'/,
type => 'file');
my $proc;
plan +@files;

for @files -> $file {
$proc = run 'perl6', $file, out => '/dev/null', err => '/dev/null';
if $proc.exitcode == 0 {
pass "$file is compileable";
} else {
flunk "$file examples check isn't successful";
}
}

0 comments on commit e842f77

Please sign in to comment.