From 188fb91ef0da29c2e85fe10ea0e3354f72268881 Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Mon, 24 Mar 2025 00:10:04 +0100 Subject: [PATCH] Add another test --- main_test.go | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/main_test.go b/main_test.go index 6ddebe5..aa6806f 100644 --- a/main_test.go +++ b/main_test.go @@ -1057,3 +1057,46 @@ func TestStringVsNumericPriority(t *testing.T) { }) } } + +func TestRegression(t *testing.T) { + input := ` + + Verb_CastAbility + 0 + 120 + true + true + + false + false + false + true + + ` + expected := ` + + Verb_CastAbility + 0 + 120 + true + false + + false + false + false + true + + ` + + pattern := regexp.MustCompile("(?s)requireLineOfSight>(true)") + + luaExpr := buildLuaScript("s1 = 'false'") + result, _, _, err := process(string(input), pattern, luaExpr, "Abilities.xml", "s1 = 'false'") + if err != nil { + t.Fatalf("Process function failed: %v", err) + } + + if result != expected { + t.Errorf("Expected output: %s, got: %s", expected, result) + } +} \ No newline at end of file