Skip to content

Commit 19b736d

Browse files
committed
Add tests
1 parent e8cf00f commit 19b736d

4 files changed

+46
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
'test_type': 'output_check',
3+
'errors': """
4+
ctl_flow_statement_alt_syntax_removal_p1.pwn(6) : error 029: invalid expression, assumed zero
5+
ctl_flow_statement_alt_syntax_removal_p1.pwn(6) : error 017: undefined symbol "begin"
6+
ctl_flow_statement_alt_syntax_removal_p1.pwn(6 -- 7) : warning 215: expression has no effect
7+
ctl_flow_statement_alt_syntax_removal_p1.pwn(7) : error 001: expected token: "(", but found "-identifier-"
8+
ctl_flow_statement_alt_syntax_removal_p1.pwn(7) : fatal error 107: too many error messages on one line
9+
10+
Compilation aborted.
11+
"""
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
new const TRUE = true;
2+
3+
main()
4+
{
5+
// Keywords "*begin", "*end" and "*then" are no longer valid
6+
while (TRUE) *begin *end
7+
if TRUE *then
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
'test_type': 'output_check',
3+
'errors': """
4+
ctl_flow_statement_alt_syntax_removal_p2.pwn(9) : error 001: expected token: "(", but found "-identifier-"
5+
ctl_flow_statement_alt_syntax_removal_p2.pwn(9) : error 001: expected token: ")", but found "do"
6+
ctl_flow_statement_alt_syntax_removal_p2.pwn(10) : error 001: expected token: "(", but found ";"
7+
ctl_flow_statement_alt_syntax_removal_p2.pwn(10) : error 029: invalid expression, assumed zero
8+
ctl_flow_statement_alt_syntax_removal_p2.pwn(11) : error 001: expected token: "(", but found "-identifier-"
9+
ctl_flow_statement_alt_syntax_removal_p2.pwn(12) : error 001: expected token: "(", but found "-identifier-"
10+
ctl_flow_statement_alt_syntax_removal_p2.pwn(13) : error 001: expected token: "while", but found "}"
11+
ctl_flow_statement_alt_syntax_removal_p2.pwn(14) : error 001: expected token: ";", but found "-end of file-"
12+
"""
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#pragma option -;+
2+
3+
new const TRUE = true;
4+
5+
main()
6+
{
7+
// Alternative syntaxes for "switch", "for", "while" and "do-while"
8+
// have also been removed
9+
switch TRUE do {}
10+
for ; TRUE; do {}
11+
do {} while TRUE;
12+
while TRUE do {}
13+
}

0 commit comments

Comments
 (0)