mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 02:24:11 +01:00
Unit Test For Invalid Map Templates
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
#ifdef UNIT_TESTS
|
||||
#include "component_tests.dm"
|
||||
#include "map_templates.dm"
|
||||
#include "reagent_id_typos.dm"
|
||||
#include "spawn_humans.dm"
|
||||
#include "sql.dm"
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
/datum/unit_test/map_templates/Run()
|
||||
var/list/datum/map_template/templates = subtypesof(/datum/map_template)
|
||||
for(var/I in templates)
|
||||
var/datum/map_template/MT = new I // The new is important here to ensure stuff gets set properly
|
||||
// Check if it even has a path and if so, does it exist
|
||||
if(MT.mappath && !fexists(MT.mappath))
|
||||
Fail("The map file for [MT.type] does not exist!")
|
||||
Reference in New Issue
Block a user