Workflow update (#11933)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
Selis
2025-11-07 21:19:24 +01:00
committed by GitHub
co-authored by Kashargul
parent 7e9b77a407
commit 8d2eae74cb
16 changed files with 631 additions and 0 deletions
+1
View File
@@ -88,6 +88,7 @@
// BEGIN_INCLUDE
#include "asset_smart_cache.dm"
#include "autowiki.dm"
//#include "clothing_tests.dm" // FIXME
#include "component_tests.dm"
#include "cosmetic_tests.dm"
+35
View File
@@ -0,0 +1,35 @@
/// Tests that all autowikis generate something without runtiming
/datum/unit_test/autowiki
/datum/unit_test/autowiki/Run()
TEST_ASSERT(istext(generate_autowiki_output()), "generate_autowiki_output() did not finish successfully!")
/// Test that `include_template` produces reasonable results
/datum/unit_test/autowiki_include_template
/datum/unit_test/autowiki_include_template/Run()
var/datum/autowiki/autowiki_api = new
TEST_ASSERT_EQUAL( \
autowiki_api.include_template("Template"), \
"{{Template}}", \
"Basic template did not format correctly" \
)
TEST_ASSERT_EQUAL( \
autowiki_api.include_template("Template", list("name" = "Mothblocks")), \
"{{Template|name=Mothblocks}}", \
"Template with basic arguments did not format correctly" \
)
TEST_ASSERT_EQUAL( \
autowiki_api.include_template("Template", list("name" = autowiki_api.escape_value("P|peline"))), \
"{{Template|name=P{{!}}peline}}", \
"Template with escaped arguments did not format correctly" \
)
TEST_ASSERT_EQUAL( \
autowiki_api.include_template("Template", list("food" = list("fruit", "candy"))), \
"{{Template|food1=fruit|food2=candy}}", \
"Template with array arguments did not format correctly" \
)