mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-24 05:27:30 +01:00
Add test helpers to test .dmes
- Make long_running_test_copy.dme just include the original
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/world/New()
|
||||
/world/proc/RunTest()
|
||||
text2file("SUCCESS", "test_success.txt")
|
||||
log << "About to call TgsNew()"
|
||||
sleep_offline = FALSE
|
||||
@@ -6,10 +6,6 @@
|
||||
log << "About to call StartAsync()"
|
||||
StartAsync()
|
||||
|
||||
/world/Error(exception)
|
||||
fdel("test_success.txt")
|
||||
text2file("Runtime Error: [exception]", "test_fail_reason.txt")
|
||||
|
||||
/proc/StartAsync()
|
||||
set waitfor = FALSE
|
||||
Run()
|
||||
@@ -21,7 +17,7 @@
|
||||
|
||||
var/list/world_params = world.params
|
||||
if(!("test" in world_params) || world_params["test"] != "bababooey")
|
||||
text2file("Expected parameter test=bababooey but did not receive", "test_fail_reason.txt")
|
||||
FailTest("Expected parameter test=bababooey but did not receive", "test_fail_reason.txt")
|
||||
|
||||
world.log << "sleep2"
|
||||
sleep(150)
|
||||
|
||||
@@ -12,6 +12,6 @@
|
||||
|
||||
// BEGIN_INCLUDE
|
||||
#include "Config.dm"
|
||||
#include "..\tgs_include.dm"
|
||||
#include "../test_prelude.dm"
|
||||
#include "Test.dm"
|
||||
// END_INCLUDE
|
||||
|
||||
Reference in New Issue
Block a user