haskell / alex

A lexical analyser generator for Haskell
https://hackage.haskell.org/package/alex
BSD 3-Clause "New" or "Revised" License
298 stars 82 forks source link

Simplified test suite that runs on Windows and MacOS #238

Closed sergv closed 1 year ago

sergv commented 1 year ago

As discussed in https://github.com/haskell/alex/issues/84, it's good idea to add test suite before messing with code generation that would interplay with C preprocessor. This test suite also runs Linux builds to help establish whether it's working at all as opposed to not working due to some Windows-related issue.

What's missing is that tests run with the C preprocessor that comes bundled with GHC. As outlined deep in https://github.com/haskell/alex/issues/84, some issues were present with cpphs preprocessor that Agda used at the time.

It seems test suite could be parameterised by the C preprocessor, but it seems it would be best done on a test suite that uses testing framework like tasty. That would bring other benefits like being able to run specific tests through command-line selectors. Perhaps the makefile-based test suite is overdue to be updated?

sergv commented 1 year ago

@andreasabel Looks like haskell-actions/setup@v2 works with GHC 9.4.5.