1
0
mirror of https://github.com/cc65/cc65.git synced 2026-01-22 17:16:21 +00:00

Added more tests.

This commit is contained in:
Kugel Fuhr
2025-07-06 10:42:15 +02:00
parent 23086bccff
commit 7b79fd1ec1
19 changed files with 66 additions and 0 deletions

View File

@@ -0,0 +1 @@
.define debug(x) .out x

View File

@@ -0,0 +1,3 @@
.repeat 10
.byte $00

View File

@@ -0,0 +1,4 @@
.import foo
foo = 3

View File

@@ -0,0 +1,5 @@
foo = 3
foo = 2

View File

@@ -0,0 +1,5 @@
.macro mac
lda #$00
.byte 3

View File

@@ -0,0 +1,5 @@
.mac lda, val
ldx #val
txa

View File

@@ -0,0 +1,4 @@
.macro mac
.local .endmacro
.endmacro
mac

View File

@@ -0,0 +1,6 @@
.macro mac val
lda #val
.endmacro
.macro mac val
lda #val
.endmacro

View File

@@ -0,0 +1,5 @@
.macro foo a1, a2
.byte a1, a2
.endmacro
foo 1, 2, 3

View File

@@ -0,0 +1,7 @@
.macro mac1
.delmac mac2
.endmacro
.macro mac2
mac1
.endmacro
mac2

View File

@@ -0,0 +1,2 @@
133-errormsg.s:3: Error: Expected '.ENDREPEAT' but found 'end-of-file'
133-errormsg.s:1: Note: For this '.REPEAT' command

View File

@@ -0,0 +1,2 @@
134-errormsg.s:3: Error: Symbol 'foo' is already an import
134-errormsg.s:1: Note: The symbol was previously imported here

View File

@@ -0,0 +1,2 @@
135-errormsg.s:4: Error: Symbol 'foo' is already defined
135-errormsg.s:1: Note: The symbol was previously defined here

View File

@@ -0,0 +1,2 @@
136-errormsg.s:5: Error: Missing '.ENDMACRO' for definition of macro 'mac'
136-errormsg.s:1: Note: Macro definition started here

View File

@@ -0,0 +1,3 @@
137-errormsg.s:1: Error: Cannot use an instruction as macro name
137-errormsg.s:5: Error: Expected '.ENDMACRO' but found 'end-of-file'
137-errormsg.s:1: Note: Macro definition started here

View File

@@ -0,0 +1,3 @@
138-errormsg.s:2: Error: Expected an identifier but found '.ENDMACRO'
138-errormsg.s:4: Error: Macro 'mac' contains errors and cannot be expanded
138-errormsg.s:1: Note: Definition of macro 'mac' was here

View File

@@ -0,0 +1,2 @@
139-errormsg.s:4: Error: A macro named 'mac' is already defined
139-errormsg.s:1: Note: Previous definition of macro 'mac' was here

View File

@@ -0,0 +1,2 @@
140-errormsg.s:5: Error: Too many parameters for macro 'foo'
140-errormsg.s:1: Note: See definition of macro 'foo' which was here

View File

@@ -0,0 +1,3 @@
141-errormsg.s:7: Error: Cannot delete macro 'mac2' which is currently expanded
141-errormsg.s:5: Note: Expanded from macro here
141-errormsg.s:2: Note: Expanded from macro here