Commit 8005af16 authored by ian@well-typed.com's avatar ian@well-typed.com
Browse files

Use a proper executable (rather than a shell script) in T6106

Fixes the test on Windows
parent 6eb328b5
......@@ -34,3 +34,8 @@ ghci037:
ghci056_setup:
'$(TEST_HC)' $(TEST_HC_OPTS) -c ghci056_c.c
.PHONY: T6106_prep
T6106_prep:
'$(TEST_HC)' $(TEST_HC_OPTS) -v0 --make T6106_preproc
......@@ -3,7 +3,7 @@
:l
:shell rm -f T6106.hs
:shell echo "{-# OPTIONS_GHC -F -pgmF ./T6106_preproc.sh #-}" >T6106.hs
:shell echo "{-# OPTIONS_GHC -F -pgmF ./T6106_preproc #-}" >T6106.hs
:shell echo "module T6106 where" >>T6106.hs
:load T6106.hs
-- second one should fail:
......
import Control.Concurrent
import Data.ByteString as BS
import System.Environment
main :: IO ()
main = do args <- getArgs
case args of
[x, y, z] -> f x y z
_ -> error ("Bad args: " ++ show args)
f :: String -> String -> String -> IO ()
f x y z = do bs <- BS.readFile y
BS.writeFile z bs
threadDelay 1000000
Prelude.writeFile x "FAIL"
#!/bin/sh
#
# file T6106_preproc.sh
#
cat $2 > $3
sleep 1
echo "FAIL" >$1
......@@ -128,7 +128,13 @@ 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'])
test('T6106',
[extra_clean(['T6106.hs',
'T6106_preproc.hi', 'T6106_preproc.o',
'T6106_preproc', 'T6106_preproc.exe']),
pre_cmd('$MAKE -s --no-print-directory T6106_prep')],
ghci_script,
['T6106.script'])
test('T6105', normal, ghci_script, ['T6105.script'])
test('T7117', normal, ghci_script, ['T7117.script'])
test('ghci058',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment