Skip to content

Commit 5442419

Browse files
committed
Test: Replace all love._os variables to love.system.getOS() calls.
1 parent f4d8313 commit 5442419

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

testing/main.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ love.load = function(args)
5757
end
5858

5959
-- mount for output later
60-
if love.filesystem.mountFullPath and love._os ~= "Android" then
60+
if love.filesystem.mountFullPath and love.system.getOS() ~= "Android" then
6161
love.filesystem.mountFullPath(love.filesystem.getSource() .. "/output", "tempoutput", "readwrite")
6262
end
6363
love.filesystem.createDirectory("tempoutput/actual")

testing/tests/filesystem.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ end
362362

363363
-- love.filesystem.mountFullPath
364364
love.test.filesystem.mountFullPath = function(test)
365-
if love._os == 'Android' then
365+
if love.system.getOS() == 'Android' then
366366
test:skipTest('getSource() mounting is not supported for .love files')
367367
return
368368
end
@@ -380,7 +380,7 @@ end
380380

381381
-- love.filesystem.unmountFullPath
382382
love.test.filesystem.unmountFullPath = function(test)
383-
if love._os == 'Android' then
383+
if love.system.getOS() == 'Android' then
384384
test:skipTest('getSource() mounting is not supported for .love files')
385385
return
386386
end
@@ -403,7 +403,7 @@ love.test.filesystem.mountCommonPath = function(test)
403403
local mount3 = love.filesystem.mountCommonPath('userhome', 'userhome', 'readwrite')
404404
local mount4 = love.filesystem.mountCommonPath('userappdata', 'userappdata', 'readwrite')
405405
-- userdesktop isnt valid on linux
406-
if love._os ~= 'Linux' and love._os ~= 'Android' then
406+
if love.system.getOS() ~= 'Linux' and love.system.getOS() ~= 'Android' then
407407
local mount5 = love.filesystem.mountCommonPath('userdesktop', 'userdesktop', 'readwrite')
408408
test:assertTrue(mount5, 'check mount userdesktop')
409409
end

0 commit comments

Comments
 (0)