[MLton-commit] r7179

Matthew Fluet fluet at mlton.org
Fri Jun 19 08:27:23 PDT 2009


Remove temporary files; explain failure on Win32.
----------------------------------------------------------------------

U   mlton/trunk/regression/binio.sml
U   mlton/trunk/regression/textio.2.sml

----------------------------------------------------------------------

Modified: mlton/trunk/regression/binio.sml
===================================================================
--- mlton/trunk/regression/binio.sml	2009-06-19 13:55:57 UTC (rev 7178)
+++ mlton/trunk/regression/binio.sml	2009-06-19 15:27:22 UTC (rev 7179)
@@ -12,6 +12,8 @@
         val readChars = BinIO.inputAll inStr
         val _ = BinIO.closeIn inStr
 
+        val _ = OS.FileSys.remove filename
+
         fun testCharF (c, cnt) =
               let
                 val readC = Word8Vector.sub(readChars, cnt)
@@ -19,7 +21,7 @@
                           ()
                         else
                           print ("Error at index: " ^ (Int.toString cnt) ^ ": " ^
-                                 (Word8.toString c) ^ " <> " ^ (Word8.toString readC))
+                                 (Word8.toString c) ^ " <> " ^ (Word8.toString readC) ^ "\n")
               in
                 cnt + 1
               end

Modified: mlton/trunk/regression/textio.2.sml
===================================================================
--- mlton/trunk/regression/textio.2.sml	2009-06-19 13:55:57 UTC (rev 7178)
+++ mlton/trunk/regression/textio.2.sml	2009-06-19 15:27:22 UTC (rev 7179)
@@ -1,5 +1,5 @@
 (* Notice: This test will not be passed on platforms like Win32!
-           But for Linux it happens to work... *)
+           (due to behind-the-scenes CR/LF <=> LF conversions). *)
 
 val filename = OS.FileSys.tmpName ()
 
@@ -15,6 +15,8 @@
         val readChars = TextIO.inputAll inStr
         val _ = TextIO.closeIn inStr
 
+        val _ = OS.FileSys.remove filename
+
         fun testCharF (c, cnt) =
               let
                 val readC = CharVector.sub(readChars, cnt)
@@ -22,7 +24,7 @@
                           ()
                         else
                           print ("Error at index: " ^ (Int.toString cnt) ^ ": " ^
-                                 (Char.toString c) ^ " <> " ^ (Char.toString readC))
+                                 (Char.toString c) ^ " <> " ^ (Char.toString readC) ^ "\n")
               in
                 cnt + 1
               end




More information about the MLton-commit mailing list