diff options
-rw-r--r-- | app.lua | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/app.lua b/app.lua index 8a7e0b2..03bc4de 100644 --- a/app.lua +++ b/app.lua @@ -273,17 +273,6 @@ end -- various Lua and LÖVE helpers, tests will be able to check the results of -- file operations inside the App.filesystem table. -function App.open_for_writing(filename) - App.filesystem[filename] = '' - return { - write = function(self, s) - App.filesystem[filename] = App.filesystem[filename]..s - end, - close = function(self) - end, - } -end - function App.open_for_reading(filename) if App.filesystem[filename] then return { @@ -299,6 +288,17 @@ function App.open_for_reading(filename) end end +function App.open_for_writing(filename) + App.filesystem[filename] = '' + return { + write = function(self, s) + App.filesystem[filename] = App.filesystem[filename]..s + end, + close = function(self) + end, + } +end + function App.mkdir(dirname) -- nothing in test mode end |