Skip to content

Commit 76e8b17

Browse files
committed
Add test for #line in ASM contexts
This one test it in BASIC listings
1 parent 37b74a0 commit 76e8b17

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

tests/functional/line_err.bas

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
DIM q as UByte = 1
2+
ASM
3+
NOP
4+
#line 25
5+
END ASM
6+
DIM q = 1: REM this error should show at line 26, not line 6!
7+

tests/functional/test_errmsg.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,4 +172,7 @@ due_par.bas:5: error: Syntax error. Unexpected end of file
172172
error_array.bas:3: error: Invalid assignment. Variable z$() is an array
173173
>>> process_file('prepro76.bi')
174174
prepro76.bi:2: error: this is an intended error
175-
175+
>>> process_file('line_asm.bi')
176+
line_asm.bi:26: warning: this should be line 26
177+
>>> process_file('line_err.bas')
178+
line_err.bas:5: error: Variable 'q' already declared at line_err.bas:1

0 commit comments

Comments
 (0)