Skip to content

Commit

Permalink
unix fixes
Browse files Browse the repository at this point in the history
apparently the test fails because unix doesn't like rustg file procs.

I'll still keep it for windows just because I can.
  • Loading branch information
MosleyTheMalO committed Jul 21, 2024
1 parent 0d32789 commit 8bb688f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/modules/unit_tests/~splurt/underwear_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@
var/list/lines = outputs[object_type]
var/output_file = "[lines.Join("\n")]"
rustg_file_write(output_file, "data/~generated_files/[object_type].dm")
var/current = rustg_file_read("modular_zzplurt/code/modules/clothing/underwear/~generated_files/[object_type].dm")
var/current = world.system_type == UNIX ? file2text("modular_zzplurt/code/modules/clothing/underwear/~generated_files/[object_type].dm") : rustg_file_read("modular_zzplurt/code/modules/clothing/underwear/~generated_files/[object_type].dm") //Apparently unix doesn't like rustg file procs
if(current != output_file)
log("[object_type] is out of date.")
fail = TRUE

if(fail)
Expand Down
8 changes: 8 additions & 0 deletions tools/ticked_file_enforcement/ticked_file_enforcement.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ def post_error(string):
elif line == "// SKYRAT EDIT END":
continue
# SKYRAT EDIT END
# SPLURT EDIT START - Modular unit tests
elif line == "// SPLURT EDIT START" or line == "// SPLURT EDIT END":
continue
# SPLURT EDIT END

lines.append(line)

Expand Down Expand Up @@ -88,6 +92,10 @@ def post_error(string):
if("~skyrat/" in code_file):
dm_path = "~skyrat\\" + dm_path
# SKYRAT EDIT END
# SPLURT EDIT START - Modular unit tests - guess
if("~splurt/" in code_file):
dm_path = "~splurt\\" + dm_path
# SPLURT EDIT END

included = f"#include \"{dm_path}\"" in lines

Expand Down

0 comments on commit 8bb688f

Please sign in to comment.