1{-# LANGUAGE OverloadedStrings #-}
5import qualified ProjectM36.Attribute as A
6import TutorialD.Interpreter.Import.TutorialD
9import qualified Data.Vector as V
14 tcounts <- runTestTT $ TestList [testTutdImport]
15 if errors tcounts + failures tcounts > 0 then exitFailure else exitSuccess
18testTutdImport = TestCase $ do
19 withSystemTempFile "m.tutd" $ \tempPath handle -> do
20 hPutStrLn handle "x:=relation{tuple{a 5,b \"spam\"}}"
22 let expectedExpr = MultipleExpr [Assign "x" (ExistingRelation (Relation expectedAttrs $ RelationTupleSet [RelationTuple expectedAttrs $ V.fromList [intAtom 5, stringAtom "spam"]]))]
23 expectedAttrs = A.attributesFromList [Attribute "a" intAtomType, Attribute "b" stringAtomType]
24 imported <- importTutorialD tempPath
25 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