mirror of
https://github.com/lutris/lutris
synced 2024-11-02 08:20:51 +00:00
ad50383e5e
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.
14 lines
513 B
Python
14 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")
|