Added a character saving unit test.

This commit is contained in:
Putnam
2020-08-29 22:58:04 -07:00
parent 55226048b2
commit e97ef2d84d
2 changed files with 9 additions and 0 deletions

View File

@@ -3,6 +3,7 @@
#ifdef UNIT_TESTS
#include "anchored_mobs.dm"
#include "character_saving.dm"
#include "component_tests.dm"
#include "reagent_id_typos.dm"
#include "reagent_recipe_collisions.dm"

View File

@@ -0,0 +1,8 @@
/datum/unit_test/character_saving/Run()
try
var/datum/preferences/P = new
P.load_path("test")
P.load_character(0)
P.save_character()
catch(exception/e)
Fail("Failed to save and load character due to exception [e.name]")