@@ -5,6 +5,8 @@ import System.Exit
5import System.IO.Temp
5import System.IO.Temp
6import qualified Data.Map as M
6import qualified Data.Map as M
7import System.IO
7import System.IO
8+import qualified Data.ByteString as BS
9+import qualified Data.Text.Encoding as TE
9main :: IO ()
11main :: IO ()
@@ -14,7 +16,7 @@ main = do
14testTutdImport :: Test
16testTutdImport :: Test
15testTutdImport = TestCase $
17testTutdImport = TestCase $
16 withSystemTempFile "m.tutd" $ \tempPath handle -> do
18 withSystemTempFile "m.tutd" $ \tempPath handle -> do
17− hPutStrLn handle "x:=relation{tuple{a 5,b \"spam\"}}; y:=relation{tuple{b \"漢字\"}}"
19+ BS.hPut handle (TE.encodeUtf8 "x:=relation{tuple{a 5,b \"spam\"}}; y:=relation{tuple{b \"漢字\"}}")
18 hClose handle
20 hClose handle
19 let expectedExpr = MultipleExpr [
21 let expectedExpr = MultipleExpr [
20 Assign "x" (MakeRelationFromExprs Nothing
22 Assign "x" (MakeRelationFromExprs Nothing