From c5562018b69e44675c02d59b0f2e872454dc05e5 Mon Sep 17 00:00:00 2001 From: Kai Date: Thu, 26 Dec 2024 12:14:38 +0100 Subject: [PATCH] test: :test_tube: test script A and B without hook check --- test/Unit/test_mod_hook_preprocessor.gd | 4 ++-- test/test_mod_hook_preprocessor/test_script_A_processed.gd | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/Unit/test_mod_hook_preprocessor.gd b/test/Unit/test_mod_hook_preprocessor.gd index 8b07ee4b..89365a11 100644 --- a/test/Unit/test_mod_hook_preprocessor.gd +++ b/test/Unit/test_mod_hook_preprocessor.gd @@ -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("#") diff --git a/test/test_mod_hook_preprocessor/test_script_A_processed.gd b/test/test_mod_hook_preprocessor/test_script_A_processed.gd index 13310174..3737286b 100644 --- a/test/test_mod_hook_preprocessor/test_script_A_processed.gd +++ b/test/test_mod_hook_preprocessor/test_script_A_processed.gd @@ -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)