haskell / haskeline

A Haskell library for line input in command-line programs.
https://hackage.haskell.org/package/haskeline
BSD 3-Clause "New" or "Revised" License
221 stars 75 forks source link

Make tests runnable by cabal #66

Closed nightscape closed 6 years ago

nightscape commented 7 years ago

Hi @judah,

Haskell noob here, so I might be running in the entirely wrong direction. I tried to change the package structure and the test scripts so that one can the examples with cabal run and the tests with cabal test. This could then also be used in the Travis build which afais does not run any of the existing tests. I'm not sure if this was absolutely necessary, but I changed the project structure according to this Stackoverflow answer.

There are mainly two things which are not so nice yet:

  1. The tests pass even when they shouldn't.
  2. The Unit.hs knows about cabal because it will call cabal run when no command line arguments are specified. I searched for a way to pass in command line arguments from cabal itself (then only cabal would know about cabal), but I didn't find anything.

Btw, my bigger goal is to create haskeline patches for eta-hackage which looks quite challenging :sweat_smile:


This change is Reviewable

nightscape commented 6 years ago

Hi @judah, unfortunately I got pulled into other directions and probably won't have time to finish this anytime soon... Shall I close the PR?

judah commented 6 years ago

Sure, we can close this PR and open another one if you or anyone else wants to take this on.