-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #730 from Golmote/tests-pascal
Add tests for Pascal
- Loading branch information
Showing
5 changed files
with
243 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
(* foo *) | ||
(* foo | ||
bar *) | ||
{ foo } | ||
{ foo | ||
bar } | ||
// | ||
// foobar | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["comment", "(* foo *)"], | ||
["comment", "(* foo\r\nbar *)"], | ||
["comment", "{ foo }"], | ||
["comment", "{ foo\r\nbar }"], | ||
["comment", "//"], | ||
["comment", "// foobar"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for comments. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
absolute array asm | ||
begin case const | ||
constructor | ||
destructor | ||
do downto else | ||
end file for | ||
function goto | ||
if implementation | ||
inherited inline | ||
interface label | ||
nil object of | ||
operator packed | ||
procedure program | ||
record reintroduce | ||
repeat self | ||
set string then | ||
to type unit | ||
until uses var | ||
while with | ||
|
||
dispose exit false | ||
new true | ||
|
||
class dispinterface | ||
except exports | ||
finalization | ||
finally | ||
initialization | ||
inline library | ||
on out packed | ||
property raise | ||
resourcestring | ||
threadvar try | ||
|
||
absolute abstract | ||
alias assembler | ||
bitpacked break | ||
cdecl continue | ||
cppdecl cvar | ||
default deprecated | ||
dynamic enumerator | ||
experimental | ||
export external | ||
far far16 | ||
forward generic | ||
helper implements | ||
index interrupt | ||
iochecks local | ||
message name near | ||
nodefault noreturn | ||
nostackframe | ||
oldfpccall | ||
otherwise | ||
overload override | ||
pascal platform | ||
private protected | ||
public published | ||
read register | ||
reintroduce result | ||
safecall saveregisters | ||
softfloat specialize | ||
static stdcall | ||
stored strict | ||
unaligned | ||
unimplemented | ||
varargs virtual | ||
write | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["keyword", "absolute"], ["keyword", "array"], ["keyword", "asm"], | ||
["keyword", "begin"], ["keyword", "case"], ["keyword", "const"], | ||
["keyword", "constructor"], | ||
["keyword", "destructor"], | ||
["keyword", "do"], ["keyword", "downto"], ["keyword", "else"], | ||
["keyword", "end"], ["keyword", "file"], ["keyword", "for"], | ||
["keyword", "function"], ["keyword", "goto"], | ||
["keyword", "if"], ["keyword", "implementation"], | ||
["keyword", "inherited"], ["keyword", "inline"], | ||
["keyword", "interface"], ["keyword", "label"], | ||
["keyword", "nil"], ["keyword", "object"], ["keyword", "of"], | ||
["keyword", "operator"], ["keyword", "packed"], | ||
["keyword", "procedure"], ["keyword", "program"], | ||
["keyword", "record"], ["keyword", "reintroduce"], | ||
["keyword", "repeat"], ["keyword", "self"], | ||
["keyword", "set"], ["keyword", "string"], ["keyword", "then"], | ||
["keyword", "to"], ["keyword", "type"], ["keyword", "unit"], | ||
["keyword", "until"], ["keyword", "uses"], ["keyword", "var"], | ||
["keyword", "while"], ["keyword", "with"], | ||
|
||
["keyword", "dispose"], ["keyword", "exit"], ["keyword", "false"], | ||
["keyword", "new"], ["keyword", "true"], | ||
|
||
["keyword", "class"], ["keyword", "dispinterface"], | ||
["keyword", "except"], ["keyword", "exports"], | ||
["keyword", "finalization"], | ||
["keyword", "finally"], | ||
["keyword", "initialization"], | ||
["keyword", "inline"], ["keyword", "library"], | ||
["keyword", "on"], ["keyword", "out"], ["keyword", "packed"], | ||
["keyword", "property"], ["keyword", "raise"], | ||
["keyword", "resourcestring"], | ||
["keyword", "threadvar"], ["keyword", "try"], | ||
|
||
["keyword", "absolute"], ["keyword", "abstract"], | ||
["keyword", "alias"], ["keyword", "assembler"], | ||
["keyword", "bitpacked"], ["keyword", "break"], | ||
["keyword", "cdecl"], ["keyword", "continue"], | ||
["keyword", "cppdecl"], ["keyword", "cvar"], | ||
["keyword", "default"], ["keyword", "deprecated"], | ||
["keyword", "dynamic"], ["keyword", "enumerator"], | ||
["keyword", "experimental"], | ||
["keyword", "export"], ["keyword", "external"], | ||
["keyword", "far"], ["keyword", "far16"], | ||
["keyword", "forward"], ["keyword", "generic"], | ||
["keyword", "helper"], ["keyword", "implements"], | ||
["keyword", "index"], ["keyword", "interrupt"], | ||
["keyword", "iochecks"], ["keyword", "local"], | ||
["keyword", "message"], ["keyword", "name"], ["keyword", "near"], | ||
["keyword", "nodefault"], ["keyword", "noreturn"], | ||
["keyword", "nostackframe"], | ||
["keyword", "oldfpccall"], | ||
["keyword", "otherwise"], | ||
["keyword", "overload"], ["keyword", "override"], | ||
["keyword", "pascal"], ["keyword", "platform"], | ||
["keyword", "private"], ["keyword", "protected"], | ||
["keyword", "public"], ["keyword", "published"], | ||
["keyword", "read"], ["keyword", "register"], | ||
["keyword", "reintroduce"], ["keyword", "result"], | ||
["keyword", "safecall"], ["keyword", "saveregisters"], | ||
["keyword", "softfloat"], ["keyword", "specialize"], | ||
["keyword", "static"], ["keyword", "stdcall"], | ||
["keyword", "stored"], ["keyword", "strict"], | ||
["keyword", "unaligned"], | ||
["keyword", "unimplemented"], | ||
["keyword", "varargs"], ["keyword", "virtual"], | ||
["keyword", "write"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for all keywords. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
42 | ||
3.14159 | ||
2.1e4 | ||
1.0e-1 | ||
3.8e+24 | ||
$7aff | ||
&17 | ||
%11110101 | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["number", "42"], | ||
["number", "3.14159"], | ||
["number", "2.1e4"], | ||
["number", "1.0e-1"], | ||
["number", "3.8e+24"], | ||
["number", "$7aff"], | ||
["number", "&17"], | ||
["number", "%11110101"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for decimal, hexadecimal, octal and binary numbers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
.. ** := | ||
< << <= > >> >= | ||
+ - * / | ||
+= -= *= /= | ||
@ ^ = | ||
|
||
and as div | ||
exclude in | ||
include is | ||
mod not or | ||
shl shr xor | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["operator", ".."], ["operator", "**"], ["operator", ":="], | ||
["operator", "<"], ["operator", "<<"], ["operator", "<="], ["operator", ">"], ["operator", ">>"], ["operator", ">="], | ||
["operator", "+"], ["operator", "-"], ["operator", "*"], ["operator", "/"], | ||
["operator", "+="], ["operator", "-="], ["operator", "*="], ["operator", "/="], | ||
["operator", "@"], ["operator", "^"], ["operator", "="], | ||
|
||
["operator", "and"], ["operator", "as"], ["operator", "div"], | ||
["operator", "exclude"], ["operator", "in"], | ||
["operator", "include"], ["operator", "is"], | ||
["operator", "mod"], ["operator", "not"], ["operator", "or"], | ||
["operator", "shl"], ["operator", "shr"], ["operator", "xor"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for operators. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
'' | ||
'fo''o' | ||
^G | ||
#7 | ||
#$f4 | ||
'foo'#9'bar' | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["string", "''"], | ||
["string", "'fo''o'"], | ||
["string", "^G"], | ||
["string", "#7"], | ||
["string", "#$f4"], | ||
["string", "'foo'#9'bar'"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for strings and chars. |