User:Socke/Testable Begin
About
This template is used to mark a Wiki Page as testable Free Pascal Source. The test is a simple compile test. The test utility is Wiki Example Tester, it is hostet on Github: https://github.com/SAmeis/Wiki-Example-Tester
You can imagine that not working examples are a very harsh stopping for beginners. So this aims to improve the quality of the source code example in this Wiki. With this tool it should be possible to get a list of not compiling source codes, which then can be fixed.
Usage
Create an own Wiki page for each testable code. Each page should look like
{{User:Socke/Testable_Begin}} <syntaxhighlight> program myprogram; begin // your code end; </syntaxhighlight> {{User:Socke/Testable_End}}
The whole template has to be in one line; the template name has to use the underscored template name—{{User:Socke/Testable_Begin}} is okay, {{User:Socke/Testable Begin}} is not. You may not specify each parameter on a new line (unless you optimize the regular expressions which are used to parse this).
Valid example | Invalid example |
---|---|
{{User:Socke/Testable_Begin|os=Linux|preset=MyPresetConfig|packages=LCL}} |
{{User:Socke/Testable_Begin |os=Linux |preset=MyPresetConfig |packages=LCL }} |
Template parameters
You can specify some paramters to this template which are recognized by the testing utility (but not used in any means).
Parameter | Description |
---|---|
preset | Predefined set of FPC/Lazarus configuration (e.g. Raspberry) |
os | Operating system (e.g. WinXP, MaxOSX10.6, Debian7, etc.) |
packages | Required Lazarus Packages in build environment; Package names are separated by comma e.g. PascalIO,LCL,LCLBase. There must not be any spaces in this value. |