mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-22 12:37:24 +01:00
@@ -19,6 +19,21 @@
|
||||
if(!("test" in world_params) || world_params["test"] != "bababooey")
|
||||
FailTest("Expected parameter test=bababooey but did not receive", "test_fail_reason.txt")
|
||||
|
||||
fdel("test_event_output.txt")
|
||||
var/test_data = "nwfiuurhfu"
|
||||
world.TgsTriggerEvent("test_event", list(test_data), TRUE)
|
||||
if(!fexists("test_event_output.txt"))
|
||||
FailTest("Expected test_event_output.txt to exist here", "test_fail_reason.txt")
|
||||
|
||||
var/test_contents = copytext(file2text("test_event_output.txt"), 1, length(test_data) + 1)
|
||||
if(test_contents != test_data)
|
||||
FailTest("Expected test_event_output.txt to contain [test_data] here. Got [test_contents]", "test_fail_reason.txt")
|
||||
|
||||
fdel("test_event_output.txt")
|
||||
world.TgsTriggerEvent("test_event", list("asdf"), FALSE)
|
||||
if(fexists("test_event_output.txt"))
|
||||
FailTest("Expected test_event_output.txt to not exist here", "test_fail_reason.txt")
|
||||
|
||||
world.log << "sleep2"
|
||||
sleep(150)
|
||||
world.log << "Terminating..."
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
echo "Running test_event script"
|
||||
|
||||
rem mingw has their own /usr/bin/timeout
|
||||
C:\Windows\system32\timeout.exe /t 5
|
||||
cd %1
|
||||
cd tests\DMAPI\BasicOperation
|
||||
echo %2 > test_event_output.txt
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
echo "Running test_event script - $1 - $2"
|
||||
|
||||
sleep 5
|
||||
|
||||
cd $1
|
||||
cd tests/DMAPI/BasicOperation
|
||||
|
||||
echo $2 > test_event_output.txt
|
||||
|
||||
Reference in New Issue
Block a user