Skip to content

Commit

Permalink
SporeModManager: add invalid ModInfo.xml test to test.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosalie241 committed Jan 24, 2024
1 parent 5bf3ded commit 85d65c5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions SporeModManager/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,14 @@ def test_install():
assert result.stdout == b''
assert result.stderr != b''

# verify that an invalid modinfo.xml fails
xml = '<mod <prerequisite> />'
write_sporemod(xml)
result = run_smm([ 'install', sporemod_file ])
assert result.returncode != 0
assert result.stdout == b''
assert result.stderr != b''

# Tests whether uninstall works correctly
def test_uninstall():
print(f'Running {test_uninstall.__name__}...')
Expand Down

0 comments on commit 85d65c5

Please sign in to comment.