3import TutorialD.Interpreter.Import.TutorialD
6import qualified Data.Map as M
8import qualified Data.ByteString as BS
9import qualified Data.Text.Encoding as TE
13 tcounts <- runTestTT $ TestList [testTutdImport]
14 if errors tcounts + failures tcounts > 0 then exitFailure else exitSuccess
17testTutdImport = TestCase $
18 withSystemTempFile "m.tutd" $ \tempPath handle -> do
19 BS.hPut handle (TE.encodeUtf8 "x:=relation{tuple{a 5,b \"spam\"}}; y:=relation{tuple{b \"漢字\"}}")
21 let expectedExpr = MultipleExpr [
22 Assign "x" (MakeRelationFromExprs Nothing
23 $ TupleExprs () [TupleExpr (M.fromList [("a", NakedAtomExpr $ IntegerAtom 5),
24 ("b", NakedAtomExpr $ TextAtom "spam")])]),
25 Assign "y" (MakeRelationFromExprs Nothing
26 $ TupleExprs () [TupleExpr (M.fromList [("b", NakedAtomExpr (TextAtom "漢字"))])])]
27 imported <- importTutorialD tempPath
28 assertEqual "import tutd" (Right expectedExpr) imported
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list