Skip to content

Commit 6c565c5

Browse files
committed
Add tests
1 parent 1766fb1 commit 6c565c5

4 files changed

+42
-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,12 @@
1+
{
2+
'test_type': 'output_check',
3+
'errors': """
4+
ctl_flow_statement_alt_syntax_removal_p2.pwn(7) : error 001: expected token: "(", but found "-identifier-"
5+
ctl_flow_statement_alt_syntax_removal_p2.pwn(7) : error 001: expected token: ")", but found "do"
6+
ctl_flow_statement_alt_syntax_removal_p2.pwn(8) : error 001: expected token: "(", but found "-identifier-"
7+
ctl_flow_statement_alt_syntax_removal_p2.pwn(9) : error 001: expected token: "while", but found "for"
8+
ctl_flow_statement_alt_syntax_removal_p2.pwn(9) : error 036: empty statement
9+
ctl_flow_statement_alt_syntax_removal_p2.pwn(10) : error 001: expected token: "while", but found "}"
10+
ctl_flow_statement_alt_syntax_removal_p2.pwn(10) : error 030: compound statement not closed at the end of file (started at line 7)
11+
"""
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
new const TRUE = true;
2+
3+
main()
4+
{
5+
// Alternative syntaxes for "switch", "for", "while" and "do-while"
6+
// have also been removed
7+
switch TRUE do {}
8+
while TRUE do {}
9+
for ;; do {}
10+
}

0 commit comments

Comments
 (0)