bugfix: get tests to pass
This commit is contained in:
parent
2b3c621fe7
commit
c8efd91060
|
@ -13,6 +13,8 @@ record those here.
|
|||
graphics printed to screen, but not the precise pixels they translate to.
|
||||
- where exactly the cursor is drawn to highlight a given character
|
||||
|
||||
* Logging files created in the 'recent' file.
|
||||
|
||||
### Other compromises
|
||||
|
||||
Lua is dynamically typed. Tests can't patch over lack of type-checking.
|
||||
|
|
10
file.lua
10
file.lua
|
@ -49,10 +49,12 @@ function save_to_disk(State)
|
|||
end
|
||||
outfile:close()
|
||||
if not State.recent_updated then
|
||||
local f = io.open(State.directory..'recent', 'a')
|
||||
if f then
|
||||
f:write(State.file_path, '\n')
|
||||
f:close()
|
||||
if State.file_path then -- might not be set in some tests from lines.love that I don't want to modify in capture.love; we don't want to touch the file system then anyway
|
||||
local f = io.open(State.directory..'recent', 'a')
|
||||
if f then
|
||||
f:write(State.file_path, '\n')
|
||||
f:close()
|
||||
end
|
||||
end
|
||||
State.recent_updated = true
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user