Skip to content

Commit

Permalink
umu_test: add test for empty WINEPREFIX
Browse files Browse the repository at this point in the history
  • Loading branch information
R1kaB3rN committed Apr 19, 2024
1 parent 990908e commit f163e4e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions umu/umu_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2217,6 +2217,21 @@ def test_env_proton_nodir(self):
os.environ["GAMEID"] = self.test_file
umu_run.check_env(self.env)

def test_env_wine_empty(self):
"""Test check_env when $WINEPREFIX is empty.
When the WINEPREFIX is empty, the current working directory of the
user will be used as the prefix directory which should not happen.
An ValueError should be raised
"""
with (
self.assertRaises(ValueError),
):
os.environ["WINEPREFIX"] = ""
os.environ["GAMEID"] = self.test_file
umu_run.check_env(self.env)

def test_env_wine_dir(self):
"""Test check_env when $WINEPREFIX is not a directory.
Expand Down

0 comments on commit f163e4e

Please sign in to comment.