lutris/tests/test_scummvm.py
Jordan Christiansen ad50383e5e scummvm: Add custom data dir runner option
By default, the scummvm runner looks up the data directory relative to
the executable. It expects it to be at ../share/scummvm. That works for
a system-installed version of scummvm, where the binary is in /usr/bin
and the data is in /usr/share/scummvm. However, we shouldn't make
assumptions about the directory structure for a custom executable.

This allows setting a custom data directory in addition to the custom
executable.
2020-05-30 11:48:29 -07:00

15 lines
513 B
Python

from unittest import TestCase
from lutris.config import LutrisConfig
from lutris.runners.scummvm import scummvm
class TestScummvm(TestCase):
def test_custom_data_dir(self):
scummvm_runner = scummvm()
scummvm_runner.config = LutrisConfig()
scummvm_runner.config.runner_config["datadir"] = "~/custom/scummvm"
self.assertEqual(scummvm_runner.get_scummvm_data_dir(), "~/custom/scummvm")
self.assertEqual(scummvm_runner.get_command()[1], "--extrapath=~/custom/scummvm")