From e50236d62ba6f8955dde164c08de111f52534317 Mon Sep 17 00:00:00 2001 From: fachat Date: Wed, 1 Aug 2012 13:27:01 +0200 Subject: [PATCH] Add a new test for ca65 unnamed labels, handling across files and listing them across files --- xa/tests/listing/Makefile | 10 ++++++++-- xa/tests/listing/listca65_2.a65 | 15 +++++++++++++++ xa/tests/listing/listca65_2.ca65 | Bin 0 -> 11 bytes xa/tests/listing/listca65_2.html | 32 +++++++++++++++++++++++++++++++ xa/tests/listing/listca65_2b.a65 | 7 +++++++ 5 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 xa/tests/listing/listca65_2.a65 create mode 100644 xa/tests/listing/listca65_2.ca65 create mode 100644 xa/tests/listing/listca65_2.html create mode 100644 xa/tests/listing/listca65_2b.a65 diff --git a/xa/tests/listing/Makefile b/xa/tests/listing/Makefile index 49e2ec8..cbb69c4 100644 --- a/xa/tests/listing/Makefile +++ b/xa/tests/listing/Makefile @@ -7,7 +7,7 @@ XA=../../xa CA65=ca65 LD65=ld65 -tests: linebreak include1 listblocks listca65 clean +tests: linebreak include1 listblocks listca65 listca65_2 clean include1: include1.a65 @@ -24,10 +24,16 @@ listblocks: listblocks.a65 listca65: listca65.a65 ${XA} -XCA65 -P- -Fhtml listca65.a65 > a.out - #${CA65} $<; ${LD65} -t none -o unnamed2.ca65 unnamed2.o; rm unnamed2.o + #${CA65} $<; ${LD65} -t none -o listca65.ca65 listca65.o; rm listca65.o cmp listca65.html a.out cmp listca65.ca65 a.o65 +listca65_2: listca65_2.a65 + ${XA} -XCA65 -P- -Fhtml listca65_2.a65 > a.out + ${CA65} $<; ${LD65} -t none -o listca65_2.ca65 listca65_2.o; rm listca65_2.o + cmp listca65_2.html a.out + cmp listca65_2.ca65 a.o65 + clean: rm -f a.err a.o65 a.out diff --git a/xa/tests/listing/listca65_2.a65 b/xa/tests/listing/listca65_2.a65 new file mode 100644 index 0000000..28fe1a4 --- /dev/null +++ b/xa/tests/listing/listca65_2.a65 @@ -0,0 +1,15 @@ + +; tests the html listing feature with blocks that +; contain the same label names, but in different scopes + + .org $1000 + +: lda #$00 + + .include "listca65_2b.a65" + +label2: iny + beq label2 + + jmp :- + diff --git a/xa/tests/listing/listca65_2.ca65 b/xa/tests/listing/listca65_2.ca65 new file mode 100644 index 0000000000000000000000000000000000000000..be121928bcad5b8f9f089e44c30cfa0fb9748e3a GIT binary patch literal 11 TcmZ36CeKiFbMzvDh&ow literal 0 HcmV?d00001 diff --git a/xa/tests/listing/listca65_2.html b/xa/tests/listing/listca65_2.html new file mode 100644 index 0000000..50ba70d --- /dev/null +++ b/xa/tests/listing/listca65_2.html @@ -0,0 +1,32 @@ +(null)
+
+listca65_2.a65
+
+
+    2 A:1000                                    ; tests the html listing feature with blocks that 
+    3 A:1000                                    ; contain the same label names, but in different scopes
+
+    5 A:1000                                     *= $1000
+
+    7 A:1000  a9 00                     :           lda #$00
+
+    9 A:1002                                     .include "listca65_2b.a65"
+
+listca65_2b.a65
+
+
+    2 A:1002                                    ; to be included in listca65_2.a65
+    3 A:1002                                    ; to check HTML linkage of unnamed labels across files
+
+    5 A:1002  c8                        :           iny 
+    6 A:1003  d0 fd                              bne :-
+
+listca65_2.a65
+
+
+   11 A:1005                            label2    
+   11 A:1005  c8                                 iny 
+   12 A:1006  f0 fd                              beq label2
+
+   14 A:1008  4c 02 10                           jmp :-
+
diff --git a/xa/tests/listing/listca65_2b.a65 b/xa/tests/listing/listca65_2b.a65 new file mode 100644 index 0000000..109fcb7 --- /dev/null +++ b/xa/tests/listing/listca65_2b.a65 @@ -0,0 +1,7 @@ + + ; to be included in listca65_2.a65 + ; to check HTML linkage of unnamed labels across files + +: iny + bne :- +