@@ -24,6 +24,9 @@ avoid requiring a body.
24
24
Skip any bits marked C < :skip-test > unless the environment variable
25
25
C < RAKU_DOC_TEST_FUDGE > is set to a true value.
26
26
27
+ Complain about any stylistic issues unless the environment variable
28
+ C < RAKU_DOC_TEST_LAX > is set to a true value.
29
+
27
30
Note: This test generates a lot of noisy output to stderr; we
28
31
do hide $*ERR, but some of these are emitted from parts of
29
32
the compiler that only know about the low level handle, not the
@@ -57,22 +60,21 @@ sub test-example ($eg) {
57
60
next ;
58
61
}
59
62
# #1355 - don't like .WHAT in examples
60
- if ! $ eg <ok-test >. contains (' WHAT' ) && $ eg <contents >. contains (' .WHAT' ) {
63
+ if ! % * ENV < RAKU_DOC_TEST_LAX > && ! $ eg <ok-test >. contains (' WHAT' ) && $ eg <contents >. contains (' .WHAT' ) {
61
64
flunk " $ eg <file> chunk starting with «" ~ starts-with ($ eg <contents >) ~ ' » uses .WHAT: try .^name instead' ;
62
65
next ;
63
66
}
64
- if ! $ eg <ok-test >. contains (' dd' ) && $ eg <contents > ~~ / << 'dd' >> / {
67
+ if ! % * ENV < RAKU_DOC_TEST_LAX > && ! $ eg <ok-test >. contains (' dd' ) && $ eg <contents > ~~ / << 'dd' >> / {
65
68
flunk " $ eg <file> chunk starting with «" ~ starts-with ($ eg <contents >) ~ ' » uses dd: try say instead' ;
66
69
next ;
67
70
}
68
71
# #3309 - don't like .perl in examples
69
- if ! $ eg <ok-test >. contains (' perl' ) && $ eg <contents >. contains (' .perl' ) {
72
+ if ! % * ENV < RAKU_DOC_TEST_LAX > && ! $ eg <ok-test >. contains (' perl' ) && $ eg <contents >. contains (' .perl' ) {
70
73
flunk " $ eg <file> chunk starting with «" ~ starts-with ($ eg <contents >) ~ ' » uses .perl: use .raku instead' ;
71
74
next ;
72
75
}
73
-
74
76
# #1189 - don't use "multi sub"
75
- if ! $ eg <ok-test >. contains (' multi' ) && $ eg <contents >. contains (' multi sub' ) {
77
+ if ! % * ENV < RAKU_DOC_TEST_LAX > && ! $ eg <ok-test >. contains (' multi' ) && $ eg <contents >. contains (' multi sub' ) {
76
78
flunk " $ eg <file> chunk $ eg <count>" ~ ' uses multi sub: use multi instead' ;
77
79
next ;
78
80
}
0 commit comments