Repository : ssh://darcs.haskell.org//srv/darcs/testsuite On branch : master
http://hackage.haskell.org/trac/ghc/changeset/204fb76218beb8a37400265f916c51136890071a >--------------------------------------------------------------- commit 204fb76218beb8a37400265f916c51136890071a Author: Simon Marlow <[email protected]> Date: Tue May 22 12:01:06 2012 +0100 add test for #6106 >--------------------------------------------------------------- tests/ghci/scripts/T6106.script | 10 ++++++++++ tests/ghci/scripts/T6106.stderr | 2 ++ tests/ghci/scripts/T6106_preproc.sh | 7 +++++++ tests/ghci/scripts/all.T | 1 + 4 files changed, 20 insertions(+), 0 deletions(-) diff --git a/tests/ghci/scripts/T6106.script b/tests/ghci/scripts/T6106.script new file mode 100644 index 0000000..1b071ec --- /dev/null +++ b/tests/ghci/scripts/T6106.script @@ -0,0 +1,10 @@ +:l ../shell.hs +:def shell (\s -> do shell s; return "") +:l + +:shell rm -f T6106.hs +:shell echo "{-# OPTIONS_GHC -F -pgmF ./T6106_preproc.sh #-}" >T6106.hs +:shell echo "module T6106 where" >>T6106.hs +:load T6106.hs +-- second one should fail: +:reload diff --git a/tests/ghci/scripts/T6106.stderr b/tests/ghci/scripts/T6106.stderr new file mode 100644 index 0000000..71baf47 --- /dev/null +++ b/tests/ghci/scripts/T6106.stderr @@ -0,0 +1,2 @@ + +T6106.hs:1:1: Parse error: naked expression at top level diff --git a/tests/ghci/scripts/T6106_preproc.sh b/tests/ghci/scripts/T6106_preproc.sh new file mode 100755 index 0000000..f9ac397 --- /dev/null +++ b/tests/ghci/scripts/T6106_preproc.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# +# file T6106_preproc.sh +# +cat $2 > $3 +sleep 1 +echo "FAIL" >$1 diff --git a/tests/ghci/scripts/all.T b/tests/ghci/scripts/all.T index 716bb1c..1364784 100755 --- a/tests/ghci/scripts/all.T +++ b/tests/ghci/scripts/all.T @@ -127,3 +127,4 @@ test('T6027ghci', normal, ghci_script, ['T6027ghci.script']) test('T6007', normal, ghci_script, ['T6007.script']) test('T6091', normal, ghci_script, ['T6091.script']) +test('T6106', extra_clean(['T6106.hs']), ghci_script, ['T6106.script']) _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
