haskell / alex

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

Tests improvement #106

Closed sergv closed 7 years ago

sergv commented 7 years ago

Currently alex cabal file defines pretty simple test suite (https://github.com/simonmar/alex/blob/master/alex.cabal#L125-L128) that just calls out to make in order to build sample test programs with freshly built executable (NB executable must be built by cabal, stack won't work) and check that they're producing expected output. There's also a dependency on QuickCheck (https://github.com/simonmar/alex/blob/master/alex.cabal#L99) along with definitions of some properties and generators, but it seems they're not used anywhere and thus are not checked regularly nor automatically.

So, my question is: would it be reasonable to introduce a some testing framework to organize alex tests, both quickcheck properties and sample inputs? It seems that tasty could fit the job, are there any objections to adding it as a dependency?

simonmar commented 7 years ago

I'll happily accept patches to improve the test suite!