Skip to content

Commit

Permalink
test: 🧪 test script A and B without hook check
Browse files Browse the repository at this point in the history
  • Loading branch information
KANAjetzt committed Dec 29, 2024
1 parent d741f91 commit c556201
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/Unit/test_mod_hook_preprocessor.gd
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ func test_process_script() -> void:
var hook_pre_processor := _ModLoaderModHookPreProcessor.new()
hook_pre_processor.process_begin()

var result_a := hook_pre_processor.process_script("res://test_mod_hook_preprocessor/test_script_A.gd")
var result_a := hook_pre_processor.process_script("res://test_mod_hook_preprocessor/test_script_A.gd", false)
var result_a_expected: String = load("res://test_mod_hook_preprocessor/test_script_A_processed.gd").source_code.trim_prefix("#")
var result_b := hook_pre_processor.process_script("res://test_mod_hook_preprocessor/test_script_B.gd")
var result_b := hook_pre_processor.process_script("res://test_mod_hook_preprocessor/test_script_B.gd", false)
var result_b_expected: String = load("res://test_mod_hook_preprocessor/test_script_B_processed.gd").source_code.trim_prefix("#")
var result_c := hook_pre_processor.process_script("res://test_mod_hook_preprocessor/test_script_C.gd")
var result_c_expected: String = load("res://test_mod_hook_preprocessor/test_script_C_processed.gd").source_code.trim_prefix("#")
Expand Down
3 changes: 2 additions & 1 deletion test/test_mod_hook_preprocessor/test_script_A_processed.gd
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ func give_default() -> String:
return _ModLoaderHooks.call_hooks(vanilla_2078459544_give_default, [], 3905258887)


func did_you_know_you_can_realy_write_your_function___like_this(param_1: String, param_2=give_default()):
func did_you_know_you_can_realy_write_your_function___like_this(param_1: String\
, param_2=give_default()):
_ModLoaderHooks.call_hooks(vanilla_2078459544_did_you_know_you_can_realy_write_your_function___like_this, [param_1, param_2], 833669474)


Expand Down

0 comments on commit c556201

Please sign in to comment.