Skip to content

Commit

Permalink
Update _TestCase.gd
Browse files Browse the repository at this point in the history
Push missing changes from #366
  • Loading branch information
MikeSchulze authored Mar 9, 2024
1 parent 830862a commit e984c31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/gdUnit4/src/core/_TestCase.gd
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ func test_case_names() -> PackedStringArray:
push_error("Internal Error: Can't parse the parameterized test arguments!")
for index in matches.size():
var parameter = matches[index].get_string(0)
# cleanup parameter by remove newlines and tabs
parameter = parameter.replace("[\n", "").replace("\n", "").replace("\t", "")
_test_case_names.append(_build_test_case_name(parameter, index))
return _test_case_names
Expand All @@ -256,7 +257,6 @@ func _extract_test_names_from_expression() -> PackedStringArray:


func _build_test_case_name(test_parameter :String, parameter_index :int) -> String:
prints("'%s'" % test_parameter)
if not test_parameter.begins_with("["):
test_parameter = "[" + test_parameter
var test_name = "%s:%d %s" % [get_name(), parameter_index, test_parameter.replace('"', "'").replace("&'", "'")]
Expand Down

0 comments on commit e984c31

Please sign in to comment.