Skip to content

Commit 83e93d1

Browse files
committed
Test: Skip (un)mountFullPath tests in Android
The tests uses `getSource()` which is not supported when the test program run inside .love file or when fused.
1 parent 0cdd5ba commit 83e93d1

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

testing/tests/filesystem.lua

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,11 @@ end
362362

363363
-- love.filesystem.mountFullPath
364364
love.test.filesystem.mountFullPath = function(test)
365+
if love._os == 'Android' then
366+
test:skipTest('getSource() mounting is not supported for .love files')
367+
return
368+
end
369+
365370
-- mount something in the working directory
366371
local mount = love.filesystem.mountFullPath(love.filesystem.getSource() .. '/tests', 'tests', 'read')
367372
test:assertTrue(mount, 'check can mount')
@@ -375,6 +380,11 @@ end
375380

376381
-- love.filesystem.unmountFullPath
377382
love.test.filesystem.unmountFullPath = function(test)
383+
if love._os == 'Android' then
384+
test:skipTest('getSource() mounting is not supported for .love files')
385+
return
386+
end
387+
378388
-- try unmounting something we never mounted
379389
local unmount1 = love.filesystem.unmountFullPath(love.filesystem.getSource() .. '/faker')
380390
test:assertFalse(unmount1, 'check not mounted to start with')
@@ -393,7 +403,7 @@ love.test.filesystem.mountCommonPath = function(test)
393403
local mount3 = love.filesystem.mountCommonPath('userhome', 'userhome', 'readwrite')
394404
local mount4 = love.filesystem.mountCommonPath('userappdata', 'userappdata', 'readwrite')
395405
-- userdesktop isnt valid on linux
396-
if love.system.getOS() ~= 'Linux' then
406+
if love._os ~= 'Linux' and love._os ~= 'Android' then
397407
local mount5 = love.filesystem.mountCommonPath('userdesktop', 'userdesktop', 'readwrite')
398408
test:assertTrue(mount5, 'check mount userdesktop')
399409
end

0 commit comments

Comments
 (0)