Commit fd2a2ef2 authored by Eyal Dechter's avatar Eyal Dechter

More clean up.

parent 368dd190
......@@ -73,6 +73,7 @@ library
directory,
here,
system-filepath,
filemanip,
filepath,
cereal ==0.3.*,
text >=0.11,
......@@ -133,6 +134,7 @@ executable IHaskell
directory,
here,
system-filepath,
filemanip,
filepath,
cereal ==0.3.*,
text >=0.11,
......
......@@ -18,8 +18,12 @@ import IHaskell.Eval.Parser
import IHaskell.Types
import IHaskell.IPython
import IHaskell.Eval.Evaluate as Eval hiding (liftIO)
import qualified IHaskell.Eval.Evaluate as Eval (liftIO)
import IHaskell.Eval.Completion
import Debug.Trace
import Test.Hspec
import Test.Hspec.HUnit
......@@ -162,15 +166,17 @@ completionTests = do
withHsDirectory $ \dirPath ->
let loading xs = ":load " ++ encodeString xs
paths xs = map encodeString xs
completionHas' = completionHas_ $ Eval.evaluate defaultKernelState
(":! cd " ++ dirPath)
(\b d -> return ())
completionHas' = completionHas_ $
do Eval.evaluate defaultKernelState
(":! cd " ++ dirPath)
(\b d -> return ())
in liftIO $ do
loading ("dir" </> "file!") `completionHas'` paths ["dir" </> "file2.hs",
"dir" </> "file2.lhs"]
loading ("" </> "file1!") `completionHas'` paths ["" </> "file1.hs",
"" </> "file1.lhs"]
evalTests = do
describe "Code Evaluation" $ do
it "evaluates expressions" $ do
......@@ -425,4 +431,4 @@ parseStringTests = describe "Parser" $ do
second
|] >>= (`shouldBe` [Located 2 (Expression "first"),
Located 4 (Expression "second")])
\ No newline at end of file
Located 4 (Expression "second")])
......@@ -192,6 +192,4 @@ completePath currDir exts prefix
cut (x:xs) z@(y:ys) | x == y = cut xs ys
| otherwise = z
cut _ z = z
in relativeCompletions
in relativeCompletions
\ No newline at end of file
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