Skip to content

Commit

Permalink
Test: Replace all love._os variables to love.system.getOS() calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikuAuahDark committed Mar 17, 2024
1 parent f4d8313 commit 5442419
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion testing/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ love.load = function(args)
end

-- mount for output later
if love.filesystem.mountFullPath and love._os ~= "Android" then
if love.filesystem.mountFullPath and love.system.getOS() ~= "Android" then
love.filesystem.mountFullPath(love.filesystem.getSource() .. "/output", "tempoutput", "readwrite")
end
love.filesystem.createDirectory("tempoutput/actual")
Expand Down
6 changes: 3 additions & 3 deletions testing/tests/filesystem.lua
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ end

-- love.filesystem.mountFullPath
love.test.filesystem.mountFullPath = function(test)
if love._os == 'Android' then
if love.system.getOS() == 'Android' then
test:skipTest('getSource() mounting is not supported for .love files')
return
end
Expand All @@ -380,7 +380,7 @@ end

-- love.filesystem.unmountFullPath
love.test.filesystem.unmountFullPath = function(test)
if love._os == 'Android' then
if love.system.getOS() == 'Android' then
test:skipTest('getSource() mounting is not supported for .love files')
return
end
Expand All @@ -403,7 +403,7 @@ love.test.filesystem.mountCommonPath = function(test)
local mount3 = love.filesystem.mountCommonPath('userhome', 'userhome', 'readwrite')
local mount4 = love.filesystem.mountCommonPath('userappdata', 'userappdata', 'readwrite')
-- userdesktop isnt valid on linux
if love._os ~= 'Linux' and love._os ~= 'Android' then
if love.system.getOS() ~= 'Linux' and love.system.getOS() ~= 'Android' then
local mount5 = love.filesystem.mountCommonPath('userdesktop', 'userdesktop', 'readwrite')
test:assertTrue(mount5, 'check mount userdesktop')
end
Expand Down

0 comments on commit 5442419

Please sign in to comment.