[commit: haskeline] master: Refactor terminal unit tests. (b10e7d1)
Paolo Capriotti
p.capriotti at gmail.com
Sun Sep 9 16:57:46 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/packages/haskeline
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/b10e7d1c92e238d0b0795af878544f05011ec571
>---------------------------------------------------------------
commit b10e7d1c92e238d0b0795af878544f05011ec571
Author: Judah Jacobson <judah.jacobson at gmail.com>
Date: Sun Aug 26 20:37:55 2012 +0000
Refactor terminal unit tests.
Previously we used the "script" command-line utility to capture output from
programs that expected to be run in a terminal.
Now, we use openpty and other C function (as wrapped by the unix library) to
run them directly from Haskell.
As a related change, we now return the individual chunks of bytes that were
output from the process that we're testing. This lets us test its behavior
more specifically, in particular in the "file style" tests with an incomplete
byte sequence at EOF.
tests/Pty.hs | 100 +++++++++++++++++++++++++++++++++++++++++++++++++
tests/RunTTY.hs | 91 +++++++++++++++++++-------------------------
tests/Unit.hs | 112 +++++++++++++++++++++++++++++++++----------------------
3 files changed, 207 insertions(+), 96 deletions(-)
Diff suppressed because of size. To see it, use:
git show b10e7d1c92e238d0b0795af878544f05011ec571
More information about the Cvs-libraries
mailing list