This commit is contained in:
Kartik K. Agaram 2023-09-09 08:27:27 -07:00
parent 87ea2af2da
commit 31266e23f5
1 changed files with 11 additions and 11 deletions

22
app.lua
View File

@ -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