mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-22 20:57:23 +01:00
Workflow update (#11933)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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" \
|
||||
)
|
||||
Reference in New Issue
Block a user