Skip to content

Commit daa2950

Browse files
committed
Unify example skips.
Instead of skipping some files when extracting examples, and some when running the tests, move all the exclusions to the test; as of this commit, extract-examples now passes 100% - the goal should be to remove all these skips and still have the test file pass.
1 parent 4416cdb commit daa2950

File tree

2 files changed

+24
-10
lines changed

2 files changed

+24
-10
lines changed

util/extract-examples.p6

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,10 @@ my &verbose = sub (|c) {};
5151

5252
sub MAIN(Str :$source-path!, Str :$prefix!, Str :$exclude = ".git", Bool :v(:verbose($v)), Bool :$force, *@files) {
5353
my \exclude = none(flat <. ..>, $exclude.split(','));
54-
# We exclude these files from examples list
55-
my @exclude-list = '5to6', 'rb', 'module', 'nativecall',
56-
'testing', 'traps', 'packages', 'tables',
57-
'phasers', 'haskell';
5854

5955
@files ||= gather for $source-path {
6056
take .IO when .IO.f
61-
&& .Str.ends-with('.pod6')
62-
&& !.basename.starts-with(any @exclude-list);
57+
&& .Str.ends-with('.pod6');
6358
.IO.dir(test => exclude)».&?BLOCK when .IO.d
6459
}
6560

xt/examples-compilation.t

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,29 @@ if @*ARGS {
1414
# don't pass examples/ as part of the path name
1515
@files = @*ARGS;
1616
} else {
17-
@files = find(dir => '.',
18-
name => /'Type'|'Language' .*? .p6$/,
19-
exclude => /'exceptions.p6'|'ArgFiles.p6'/,
20-
type => 'file');
17+
@files = find(
18+
dir => '.',
19+
type => 'file',
20+
exclude => /
21+
| 'Language/5to6-nutshell.p6'
22+
| 'Language/5to6-perlfunc.p6'
23+
| 'Language/5to6-perlop.p6'
24+
| 'Language/5to6-perlsyn.p6'
25+
| 'Language/5to6-perlvar.p6'
26+
| 'Language/haskell-to-p6.p6'
27+
| 'Language/modules.p6'
28+
| 'Language/nativecall.p6'
29+
| 'Language/packages.p6'
30+
| 'Language/phasers.p6'
31+
| 'Language/rb-nutshell.p6'
32+
| 'Language/tables.p6'
33+
| 'Language/testing.p6'
34+
| 'Language/traps.p6'
35+
| 'Programs/00-running.p6'
36+
| 'Programs/01-debugging.p6'
37+
| 'Type/IO/ArgFiles.p6'
38+
/,
39+
);
2140
}
2241

2342
my $proc;

0 commit comments

Comments
 (0)