From fe9f530eb989cf4e30c3f233a63ed30fdb4655df Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Sat, 30 Dec 2023 15:25:52 +0100 Subject: [PATCH] Add testing for --debug lexer --- .gitignore | 6 +++--- tests/Makefile | 11 ++++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index a2d9c39..5708ab3 100644 --- a/.gitignore +++ b/.gitignore @@ -14,9 +14,9 @@ /examples/*.bin /examples/*.exe /old-*/ -/tests/*.[gn].hs -/tests/*.[gn].bin -/tests/*.[gn].exe +/tests/*.[dgn].hs +/tests/*.[dgn].bin +/tests/*.[dgn].exe .cabal-sandbox .stack-work cabal.sandbox.config diff --git a/tests/Makefile b/tests/Makefile index 045a143..1e0b8aa 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -102,9 +102,12 @@ TEST_ALEX_OPTS= %.g.hs : %.x $(ALEX) $(TEST_ALEX_OPTS) -g $< -o $@ -CLEAN_FILES += *.n.hs *.g.hs *.info *.hi *.o *.bin *.exe +%.d.hs : %.x + $(ALEX) $(TEST_ALEX_OPTS) --debug $< -o $@ -ALL_TEST_HS = $(shell echo $(TESTS) $(TEXT_TESTS) | sed -e 's/\([^\. ]*\)\.\(l\)\{0,1\}x/\1.n.hs \1.g.hs/g') +CLEAN_FILES += *.n.hs *.g.hs *.d.hs *.info *.hi *.o *.bin *.exe + +ALL_TEST_HS = $(shell echo $(TESTS) $(TEXT_TESTS) | sed -e 's/\([^\. ]*\)\.\(l\)\{0,1\}x/\1.n.hs \1.g.hs \1.d.hs/g') ALL_TESTS = $(patsubst %.hs, %.run, $(ALL_TEST_HS)) @@ -128,4 +131,6 @@ interact: # :set args --template=.. simple.x -o simple.n.hs debug : - @echo HC_OPTS=$(HC_OPTS) + @echo ALEX = $(ALEX) + @echo HC_OPTS = $(HC_OPTS) + @echo ALL_TESTS = $(ALL_TESTS)