lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Original test.lua fails under Windows. A fix is below:

--- test.lua.orig	Wed Feb 13 18:59:52 2008
+++ test.lua	Mon Mar 10 15:01:26 2008
@@ -80,10 +80,10 @@
 if lfs.setmode then
     -- Checking text/binary modes (works only in Windows)
     local f = io.open(tmpfile, "w")
-    local mode = lfs.setmode(f, "binary")
-    assert(mode == "text")
-    mode = lfs.setmode(f, "text")
-    assert(mode == "binary")
+    local result, mode = lfs.setmode(f, "binary")
+    assert(result and mode == "text")
+    result, mode = lfs.setmode(f, "text")
+    assert(result and mode == "binary")
     f:close()
 end

--
Shmuel