use shelltestrunner for scaffolding tests

This commit is contained in:
Greg Weber 2011-07-07 19:32:08 -07:00
parent c931fb0afd
commit 466ba86a55
5 changed files with 36 additions and 21 deletions

View File

@ -1,6 +0,0 @@
#!/bin/sh
cabal clean && cabal install && rm -rf foobar && \
runghc scaffold.hs init < input-sqlite && cd foobar && cabal install && cabal install -fdevel && cd .. && rm -rf foobar && \
runghc scaffold.hs init < input-postgres && cd foobar && cabal install && cabal install -fdevel && cd .. && rm -rf foobar && \
runghc scaffold.hs init < input-mini && cd foobar && cabal install && cabal install -fdevel && cd .. && rm -rf foobar

View File

@ -1,5 +0,0 @@
Michael
foobar
Foobar
m

View File

@ -1,5 +0,0 @@
Michael
foobar
Foobar
p

View File

@ -1,5 +0,0 @@
Michael
foobar
Foobar
s

36
test.shelltest Normal file
View File

@ -0,0 +1,36 @@
# use shelltest
# note that the first cabal install line is its own test
# cabal install shelltestrunner
# shelltest test.shelltest
cabal clean && cabal install
rm -rf foobar && runghc scaffold.hs init && cd foobar && cabal install && cabal install -fdevel && cd ..
<<<
Michael
foobar
Foobar
s
>>> /.*Registering foobar-0.0.0.*/
>>>= 0
rm -rf foobar && runghc scaffold.hs init && cd foobar && cabal install && cabal install -fdevel && cd ..
<<<
Michael
foobar
Foobar
p
>>> /.*Registering foobar-0.0.0.*/
>>>= 0
rm -rf foobar && runghc scaffold.hs init && cd foobar && cabal install && cabal install -fdevel && cd .. && rm -rf foobar
<<<
Michael
foobar
Foobar
m
>>> /.*Registering foobar-0.0.0.*/
>>>= 0