1{-# LANGUAGE OverloadedStrings #-}
4import qualified ProjectM36.Attribute as A
5import TutorialD.Interpreter.Import.TutorialD
6import qualified Data.HashSet as HS
9import qualified ProjectM36.DatabaseContext as DC
10import qualified Data.Vector as V
16 tcounts <- runTestTT $ TestList [testTutdImport]
17 if errors tcounts + failures tcounts > 0 then exitFailure else exitSuccess
20testTutdImport = TestCase $ do
21 withSystemTempFile "m.tutd" $ \tempPath handle -> do
22 hPutStrLn handle "x:=relation{tuple{a 5,b \"spam\"}}"
24 let expectedExpr = MultipleExpr [Assign "x" (ExistingRelation (Relation expectedAttrs $ HS.singleton (RelationTuple expectedAttrs $ V.fromList [IntAtom 5, StringAtom "spam"])))]
25 expectedAttrs = A.attributesFromList [Attribute "a" IntAtomType, Attribute "b" StringAtomType]
26 imported <- importTutorialD tempPath DC.empty
27 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