@@ -164,7 +164,7 @@ testPkg fp
164 do m_ist <- inPkgDir pkgdesc $
164 do m_ist <- inPkgDir pkgdesc $
165 do make (makefile pkgdesc)
165 do make (makefile pkgdesc)
166 -- Get a temporary file to save the tests' source in
166 -- Get a temporary file to save the tests' source in
167− (tmpn, tmph) <- tempIdr
167+ (tmpn, tmph) <- tempfile ".idr"
168 hPutStrLn tmph $
168 hPutStrLn tmph $
169 "module Test_______\n" ++
169 "module Test_______\n" ++
170 concat ["import " ++ show m ++ "\n"
170 concat ["import " ++ show m ++ "\n"
@@ -175,7 +175,7 @@ testPkg fp
175 concat [show t ++ "\n "
175 concat [show t ++ "\n "
176 | t <- idris_tests pkgdesc]
176 | t <- idris_tests pkgdesc]
177 hClose tmph
177 hClose tmph
178− (tmpn', tmph') <- tempfile
178+ (tmpn', tmph') <- tempfile ""
179 hClose tmph'
179 hClose tmph'
180 m_ist <- idris (Filename tmpn : NoREPL : Verbose : Output tmpn' : idris_opts pkgdesc)
180 m_ist <- idris (Filename tmpn : NoREPL : Verbose : Output tmpn' : idris_opts pkgdesc)
181 rawSystem tmpn' []
181 rawSystem tmpn' []
@@ -187,9 +187,6 @@ testPkg fp
187 case errSpan ist of
187 case errSpan ist of
188 Just _ -> exitWith (ExitFailure 1)
188 Just _ -> exitWith (ExitFailure 1)
189 _ -> return ()
189 _ -> return ()
190− where tempIdr :: IO (FilePath, Handle)
191− tempIdr = do dir <- getTemporaryDirectory
192− openTempFile (normalise dir) "idristests.idr"
194-- | Install package
191-- | Install package
195installPkg :: PkgDesc -> IO ()
192installPkg :: PkgDesc -> IO ()
@@ -214,7 +211,7 @@ testLib :: Bool -> String -> String -> IO Bool
214testLib warn p f
211testLib warn p f
215 = do d <- getDataDir
212 = do d <- getDataDir
216 gcc <- getCC
213 gcc <- getCC
217− (tmpf, tmph) <- tempfile
214+ (tmpf, tmph) <- tempfile ""
218 hClose tmph
215 hClose tmph
219 let libtest = d </> "rts" </> "libtest.c"
216 let libtest = d </> "rts" </> "libtest.c"
220 e <- rawSystem gcc [libtest, "-l" ++ f, "-o", tmpf]
217 e <- rawSystem gcc [libtest, "-l" ++ f, "-o", tmpf]