[Haskell-cafe] Test command line programs

Dupont Corentin corentin.dupont at gmail.com
Tue Oct 26 12:11:18 EDT 2010

Hello again café,

I have a command line program that takes input from various handles
(actually network sockets) like this:

> s <- hGetLine h
> etc.

I'd like to unit test this. How can I do?
I'd like to inject data on the handle so that all the input chain is tested.

How are command line programs' IO automatically tested usually?

Another little question:
How can I access the name of a function inside a function (for Trace
I have to use the CPP preprocessor?

Thanks for hints,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20101026/117ba46d/attachment.html

More information about the Haskell-Cafe mailing list