fix: address code review findings

This commit is contained in:
2026-07-19 19:22:18 +03:00
parent f1839ad9e7
commit 401c1218b6
4 changed files with 21 additions and 14 deletions

View File

@@ -44,6 +44,12 @@ func TestNormalizeString_Basic(t *testing.T) {
{"1989 (Deluxe)", ""},
{"1989 [Deluxe Edition]", ""},
{"2112 (Remastered)", ""},
// Regression: a year with a bracketed/suffixed year must NOT collapse to
// the bare year (it falsely matched "1989" before). It collapses to empty.
{"1989 [2020]", ""},
{"1989 2020", ""},
{"3000 2000", "3000"},
{"1989 RMX", "rmx"},
}
for _, tt := range tests {