Fix unit test and placeholder overlap

This commit is contained in:
JeremyStar™ 2024-04-08 20:18:49 +02:00
parent 7e7fb03e54
commit 287dea0182
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D
3 changed files with 3 additions and 3 deletions

View file

@ -44,7 +44,7 @@ func _ready() -> void:
logger.info(await core.get_formatted_string("""Version information: logger.info(await core.get_formatted_string("""Version information:
Release (semantic) = %version_semantic% Release (semantic) = %version_semantic%
Release = %version% Release = %version%
Typerelease = %version_type% Typerelease = %version_typerelease%
Type = %version_type% Type = %version_type%
Type (technical) = %version_type_technical% Type (technical) = %version_type_technical%
Development mode = %devmode% Development mode = %devmode%

View file

@ -231,7 +231,7 @@ func is_devmode() -> bool:
func get_formatted_string(string: String) -> String: func get_formatted_string(string: String) -> String:
# Version strings # Version strings
string = string.replace("%version%", str(version_version)) string = string.replace("%version%", str(version_version))
string = string.replace("%version_type%", str(version_typerelease)) string = string.replace("%version_typerelease%", str(version_typerelease))
var semantic_version: Array[int] = get_version_semantic() var semantic_version: Array[int] = get_version_semantic()
string = string.replace("%version_semantic%", str(semantic_version[0]) + "." + str(semantic_version[1]) + "." + str(semantic_version[2])) string = string.replace("%version_semantic%", str(semantic_version[0]) + "." + str(semantic_version[1]) + "." + str(semantic_version[2]))
match(version_type): match(version_type):

View file

@ -136,7 +136,7 @@ func test_formatted_string() -> void:
if core.config.custom_modules: test_custommodules = "Enabled" if core.config.custom_modules: test_custommodules = "Enabled"
else: test_custommodules = "Disabled" else: test_custommodules = "Disabled"
var test_raw: String = "version=%version% typerelease=%version_type% semantic=%version_semantic% type=%type% type_technical=%type_technical% devmode=%devmode% headless=%headless% custommodules=%custommodules% HELLO TEST! #TransRightsAreHumanRights" var test_raw: String = "version=%version% typerelease=%version_typerelease% semantic=%version_semantic% type=%version_type% type_technical=%version_type_technical% devmode=%devmode% headless=%headless% custommodules=%custommodules% HELLO TEST! #TransRightsAreHumanRights"
var test_formatted: String = "version=" + str(core.version_version) + " typerelease=" + str(core.version_typerelease) + " semantic=" + str(test_semantic[0]) + "." + str(test_semantic[1]) + "." + str(test_semantic[2]) + " type=" + test_type + " type_technical=" + test_type_technical + " devmode=" + test_devmode + " headless=" + test_headless + " custommodules=" + test_custommodules + " HELLO TEST! #TransRightsAreHumanRights" var test_formatted: String = "version=" + str(core.version_version) + " typerelease=" + str(core.version_typerelease) + " semantic=" + str(test_semantic[0]) + "." + str(test_semantic[1]) + "." + str(test_semantic[2]) + " type=" + test_type + " type_technical=" + test_type_technical + " devmode=" + test_devmode + " headless=" + test_headless + " custommodules=" + test_custommodules + " HELLO TEST! #TransRightsAreHumanRights"
# Compare # Compare