mirror of
https://github.com/cc65/cc65.git
synced 2024-12-27 15:29:46 +00:00
added a test that must fail
This commit is contained in:
parent
7c7c5af59f
commit
a3ae28a81c
@ -12,7 +12,7 @@ endif
|
||||
|
||||
WORKDIR = ../testwrk/asm
|
||||
|
||||
SUBDIRS = cpudetect opcodes listing val
|
||||
SUBDIRS = cpudetect opcodes listing val err
|
||||
|
||||
.PHONY: all continue mostlyclean clean
|
||||
|
||||
|
45
test/asm/err/Makefile
Normal file
45
test/asm/err/Makefile
Normal file
@ -0,0 +1,45 @@
|
||||
# Makefile for the tests that MUST NOT compile
|
||||
|
||||
ifneq ($(shell echo),)
|
||||
CMD_EXE = 1
|
||||
endif
|
||||
|
||||
ifdef CMD_EXE
|
||||
S = $(subst /,\,/)
|
||||
NOT = - # Hack
|
||||
NULLDEV = nul:
|
||||
MKDIR = mkdir $(subst /,\,$1)
|
||||
RMDIR = -rmdir /s /q $(subst /,\,$1)
|
||||
else
|
||||
S = /
|
||||
NOT = !
|
||||
NULLDEV = /dev/null
|
||||
MKDIR = mkdir -p $1
|
||||
RMDIR = $(RM) -r $1
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
NULLERR = 2>$(NULLDEV)
|
||||
endif
|
||||
|
||||
CA65 := $(if $(wildcard ../../../bin/ca65*),..$S..$S..$Sbin$Sca65,ca65)
|
||||
|
||||
WORKDIR = ../../../testwrk/asm/err
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
SOURCES := $(wildcard *.s)
|
||||
TESTS = $(patsubst %.s,$(WORKDIR)/%.prg,$(SOURCES))
|
||||
|
||||
all: $(TESTS)
|
||||
|
||||
$(WORKDIR):
|
||||
$(call MKDIR,$(WORKDIR))
|
||||
|
||||
$(WORKDIR)/%.prg: %.s | $(WORKDIR)
|
||||
$(if $(QUIET),echo asm/err/$*.s)
|
||||
$(NOT) $(CA65) -o $@ $< $(NULLERR)
|
||||
|
||||
clean:
|
||||
@$(call RMDIR,$(WORKDIR))
|
3
test/asm/err/bug1538-1.s
Normal file
3
test/asm/err/bug1538-1.s
Normal file
@ -0,0 +1,3 @@
|
||||
|
||||
; this should produce a range error
|
||||
.byte $1234 & $ffff
|
@ -18,9 +18,15 @@ Overall tests:
|
||||
|
||||
These go into listing/. Refer to listing/readme.txt
|
||||
|
||||
Val:
|
||||
val:
|
||||
----
|
||||
|
||||
Works very much like the /val directory used to test the compiler - individual
|
||||
tests are run in the simulator and should exit with an exit code of 0 when they
|
||||
pass, or either -1 or a number indicating what part of the test failed on error.
|
||||
|
||||
err:
|
||||
----
|
||||
|
||||
Works very much like the /err directory used to test the compiler - individual
|
||||
tests are assembled and MUST NOT assemble without error.
|
||||
|
Loading…
Reference in New Issue
Block a user