@@ -72,7 +72,10 @@ unittest
72
72
73
73
auto findDdocMacro (R)(R text, string ddocKey)
74
74
{
75
- return text.splitter(ddocKey).map! untilClosingParentheses.dropOne;
75
+ auto sr = text.splitter(ddocKey);
76
+ // don't let RUNNABLE_EXAMPLE match RUNNABLE_EXAMPLE_FOO
77
+ auto fr = sr.filter! (s => s.length ? s[0 ] != ' _' : true );
78
+ return fr.map! untilClosingParentheses.dropOne;
76
79
}
77
80
78
81
auto ddocMacroToCode (R)(R text)
@@ -95,6 +98,7 @@ int main(string[] args)
95
98
96
99
const rootDir = __FILE_FULL_PATH__.dirName.dirName;
97
100
const specDir = rootDir.buildPath(" spec" );
101
+ const articlesDir = rootDir.buildPath(" articles" );
98
102
const stdDir = rootDir.buildPath(" .." , " phobos" , " std" );
99
103
100
104
config.dmdBinPath = environment.get (" DMD" , " dmd" );
@@ -117,9 +121,12 @@ int main(string[] args)
117
121
SpecType(" $(SPEC_RUNNABLE_EXAMPLE_COMPILE" , CompileConfig.TestMode.compile),
118
122
SpecType(" $(SPEC_RUNNABLE_EXAMPLE_RUN" , CompileConfig.TestMode.run),
119
123
SpecType(" $(SPEC_RUNNABLE_EXAMPLE_FAIL" , CompileConfig.TestMode.fail),
124
+ SpecType(" $(RUNNABLE_EXAMPLE_COMPILE" , CompileConfig.TestMode.compile),
120
125
SpecType(" $(RUNNABLE_EXAMPLE" , CompileConfig.TestMode.run),
126
+ SpecType(" $(RUNNABLE_EXAMPLE_FAIL" , CompileConfig.TestMode.fail),
121
127
];
122
128
auto files = chain(specDir.dirEntries(" *.dd" , SpanMode.depth),
129
+ articlesDir.dirEntries(" *.dd" , SpanMode.depth),
123
130
stdDir.dirEntries(" *.d" , SpanMode.depth));
124
131
shared bool hasFailed;
125
132
foreach (file; files.parallel(1 ))
0 commit comments