Skip to content

Commit

Permalink
Returns the TOML library to previous functionality (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeWaka authored Jul 31, 2022
1 parent 141b460 commit b6afd89
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dmsrc/toml.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
/proc/rustg_read_toml_file(path)
var/list/output = rustg_raw_read_toml_file(path)
if (output["success"])
return output["content"]
return json_decode(output["content"])
else
CRASH(output["content"])
4 changes: 2 additions & 2 deletions tests/dm/toml.dme
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ var/test_json = @{"

var/toml_output = rustg_read_toml_file("test.toml")

if (toml_output != test_json)
CRASH("test:\n[test_toml]\n \nexpected:\n[test_json]\n \nrustg:\n[toml_output]")
if (toml_output ~! json_decode(test_json))
CRASH("test:\n[test_toml]\n \nexpected:\n[test_json]\n \nrustg:\n[json_encode(toml_output)]")

0 comments on commit b6afd89

Please sign in to comment.