Skip to content

Commit

Permalink
Add testing for --debug lexer
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasabel committed Dec 30, 2023
1 parent b82bdd1 commit fe9f530
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 8 additions & 3 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand All @@ -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)

0 comments on commit fe9f530

Please sign in to comment.