File tree Expand file tree Collapse file tree 5 files changed +73
-4
lines changed Expand file tree Collapse file tree 5 files changed +73
-4
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ use C<@ones = 1 xx 80;>.
94
94
= head2 Additive Operators
95
95
96
96
Binary C < + > and C < - > do addition and subtraction, respectively, as you would
97
- expect..
97
+ expect.
98
98
99
99
As C < . > is the method call operator, so binary C < ~ > acts as the
100
100
concatenation operator in Perl 6.
Original file line number Diff line number Diff line change @@ -817,7 +817,7 @@ Defined as:
817
817
818
818
Coerces the invocant (or in sub form, its argument) to L < Str|/type/Str > , and returns it with the first letter
819
819
case-folded to title case (or where not available, upper case), and the rest
820
- of the string case-folded to lower case..
820
+ of the string case-folded to lower case.
821
821
822
822
say 'abC'.tclc; # OUTPUT: «Abc»
823
823
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ an object of the appropriate type
12
12
13
13
B < NOTE: > the C < IO::Spec::* > classes provide low-level path operations. Unless
14
14
you're creating your own high-level path manipulation routines, you don't
15
- need to use C < IO::Spec::* > . Use L « C < IO::Path > |/type/IO::Path» instead..
15
+ need to use C < IO::Spec::* > . Use L « C < IO::Path > |/type/IO::Path» instead.
16
16
17
17
B < NOTE2: > no special validation is done by these classes (e.g. check whether
18
18
path contains a null character). It is the job of higher-level classes, like
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ the method cache.
49
49
50
50
If C < $condition > returns a true value,
51
51
C < $calculator > is called with the same arguments, and must return the code
52
- object to be invoked as the method, and is added to the method cache..
52
+ object to be invoked as the method, and is added to the method cache.
53
53
54
54
If C < $condition > returns a false value, the
55
55
next fallback (if any) is tried, and if none matches, an exception
Original file line number Diff line number Diff line change
1
+ # !/usr/bin/env perl6
2
+
3
+ use v6 ;
4
+ use Test ;
5
+ use lib ' lib' ;
6
+
7
+ = begin overview
8
+
9
+ Avoid using C < .. > - usually a typo for C < . > or C < ... >
10
+
11
+ = end overview
12
+
13
+ my @ files ;
14
+
15
+ if @ * ARGS {
16
+ @ files = @ * ARGS ;
17
+ } else {
18
+ if % * ENV <TEST_FILES > {
19
+ @ files = % * ENV <TEST_FILES >. split (' ' ). grep (*. IO . e );
20
+ } else {
21
+ @ files = qx < git ls-files > . lines ;
22
+ }
23
+ }
24
+
25
+ @ files = @ files . grep ({$ _ . ends-with (' .pod6' ) or $ _ . ends-with (' .md' )});
26
+
27
+ plan + @ files ;
28
+ my $ max-jobs = % * ENV <TEST_THREADS > // 2 ;
29
+ my % output ;
30
+
31
+ sub test-promise ($ promise ) {
32
+ my $ file = $ promise . command[* - 1 ];
33
+ test-it(% output {$ file }, $ file );
34
+ }
35
+
36
+ sub test-it (Str $ output , Str $ file ) {
37
+ my $ ok = True ;
38
+
39
+ for $ output . lines -> $ line {
40
+ if $ line ~~ / <alpha > '..' (<space > | $ ) / {
41
+ diag " Failure on line `$ line `" ;
42
+ $ ok = False ;
43
+ }
44
+ }
45
+ my $ error = $ file ;
46
+ ok $ ok , " $ error : file contains .." ;
47
+ }
48
+
49
+ my @ jobs ;
50
+ for @ files -> $ file {
51
+
52
+ my $ output = " " ;
53
+
54
+ if $ file ~~ / '.pod6' $ / {
55
+ my $ a = Proc ::Async. new ($ * EXECUTABLE-NAME , ' --doc' , $ file );
56
+ % output {$ file } = " " ;
57
+ $ a . stdout. tap (-> $ buf { % output {$ file } = % output {$ file } ~ $ buf });
58
+ push @ jobs : $ a . start;
59
+ if + @ jobs > $ max-jobs {
60
+ test-promise(await @ jobs . shift )
61
+ }
62
+ } else {
63
+ test-it($ file . IO . slurp , $ file );
64
+ }
65
+ }
66
+
67
+ for @ jobs . map : {await $ _ } -> $ r { test-promise($ r ) }
68
+
69
+ # vim: expandtab shiftwidth=4 ft=perl6
You can’t perform that action at this time.
0 commit comments