[darcs-users] darcs patch: Do not use Perl test harness. (and 3 more)
Max Battcher
me at worldmaker.net
Fri Oct 17 05:58:57 UTC 2008
Trent W. Buck wrote:
> "Jason Dagit" <dagit at codersbase.com> writes:
>> Zooko makes a wise point when he recommends our tests be written in
>> the same language we use, Haskell. [...] the big reasons to not do
>> that are: 1) It's a lot of work to convert all the tests to a new
>> language. 2) It's really easy to tell our .sh scripts are doing in
>> terms of real commands to reproduce it.
>
> There's a Haskell library called HSH which might help in this respect,
> e.g. you could do something along the lines of
>
> test_issue33 = assert_succeeds $ "darcs changes --xml" -|- "xmllint"
>
> Where "darcs changes --xml" and "xmllint" are run by the shell.
Also interesting to note that HSH.ShellEquivs encourages pure Haskell
equivalents to grep:
http://software.complete.org/static/hsh/doc//HSH/HSH-ShellEquivs.html
This has come up as an issue in testing recently for the Solaris
buildbot, due to differences in greps (not to mention that Windows users
might not have grep installed).
Bash shell scripts to HSH-based Haskell seems like potentially something
a Haskell novice could do (as in I could see myself converting a few to
practice writing Haskell).
--
--Max Battcher--
http://worldmaker.net
More information about the darcs-users
mailing list