@@ -1,6 +1,4 @@
1−import Test.HUnit
21import ProjectM36.Base
3−import System.Exit
42import ProjectM36.Relation.Show.CSV
53import ProjectM36.Relation.Parse.CSV
64import qualified ProjectM36.Attribute as A
@@ -8,10 +6,12 @@ import ProjectM36.Relation
86import ProjectM36.DataTypes.Basic
97import ProjectM36.DataTypes.List
108import ProjectM36.DataTypes.Interval
9+
10+import System.Exit
11+import Test.HUnit
1112import Data.Time.Calendar
1213import Data.Time.Clock
1314import Data.Monoid
14−
1515{-
1616import qualified Data.Text.Lazy as TL
1717import qualified Data.Text.Lazy.Encoding as TE
@@ -54,15 +54,18 @@ testCSVExport = TestCase $ do
5454 Attribute "integerattr" IntegerAtomType,
5555 Attribute "dayattr" DayAtomType,
5656 Attribute "datetimeattr" DateTimeAtomType,
57+ Attribute "bytestringattr" ByteStringAtomType,
5758 Attribute "listintegerattr" (listAtomType IntegerAtomType),
5859 Attribute "listtextattr" (listAtomType TextAtomType),
5960 Attribute "intervalattr" (IntervalAtomType DateTimeAtomType)
6061 ]
62+ sampleByteString = "\1\0\244\34\150"
6163 relOrErr = mkRelationFromList attrs [
6264 [TextAtom "text atom with \"quote\"",
6365 IntegerAtom 123,
6466 DayAtom (fromGregorian 2017 4 10),
6567 DateTimeAtom now,
68+ ByteStringAtom sampleByteString,
6669 listCons IntegerAtomType [IntegerAtom 5, IntegerAtom 6, IntegerAtom 7],
6770 listCons TextAtomType [TextAtom "text1", TextAtom "text2"],
6871 testInterval
@@ -71,6 +74,7 @@ testCSVExport = TestCase $ do
7174 IntegerAtom 314,
7275 DayAtom (fromGregorian 1001 6 28),
7376 DateTimeAtom (addUTCTime 360 now),
77+ ByteStringAtom sampleByteString,
7478 listCons IntegerAtomType [IntegerAtom 10, IntegerAtom 11, IntegerAtom 12],
7579 listCons TextAtomType [TextAtom "text5\"", TextAtom "text6\r\n"],
7680 testInterval