From 466ba86a55b3ac452a70fbc87f98754e4af5df33 Mon Sep 17 00:00:00 2001 From: Greg Weber Date: Thu, 7 Jul 2011 19:32:08 -0700 Subject: [PATCH] use shelltestrunner for scaffolding tests --- full-test.sh | 6 ------ input-mini | 5 ----- input-postgres | 5 ----- input-sqlite | 5 ----- test.shelltest | 36 ++++++++++++++++++++++++++++++++++++ 5 files changed, 36 insertions(+), 21 deletions(-) delete mode 100755 full-test.sh delete mode 100644 input-mini delete mode 100644 input-postgres delete mode 100644 input-sqlite create mode 100644 test.shelltest diff --git a/full-test.sh b/full-test.sh deleted file mode 100755 index e3207151..00000000 --- a/full-test.sh +++ /dev/null @@ -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 diff --git a/input-mini b/input-mini deleted file mode 100644 index 61f2e8be..00000000 --- a/input-mini +++ /dev/null @@ -1,5 +0,0 @@ -Michael -foobar - -Foobar -m diff --git a/input-postgres b/input-postgres deleted file mode 100644 index 0bd04d5a..00000000 --- a/input-postgres +++ /dev/null @@ -1,5 +0,0 @@ -Michael -foobar - -Foobar -p diff --git a/input-sqlite b/input-sqlite deleted file mode 100644 index af3132a8..00000000 --- a/input-sqlite +++ /dev/null @@ -1,5 +0,0 @@ -Michael -foobar - -Foobar -s diff --git a/test.shelltest b/test.shelltest new file mode 100644 index 00000000..31bbf7a9 --- /dev/null +++ b/test.shelltest @@ -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