fix: address code review findings
This commit is contained in:
@@ -48,8 +48,17 @@ func TestNormalizeString_Basic(t *testing.T) {
|
||||
// the bare year (it falsely matched "1989" before). It collapses to empty.
|
||||
{"1989 [2020]", ""},
|
||||
{"1989 2020", ""},
|
||||
{"3000 2000", "3000"},
|
||||
// Both tokens are years → both stripped → empty (no album words remain).
|
||||
{"3000 2000", ""},
|
||||
{"1989 RMX", "rmx"},
|
||||
// Regression: year regex must cover ALL 4-digit years, not just 1000-2999.
|
||||
// A reissue of a year-titled album outside that range must still collapse
|
||||
// to empty so it is correctly reported as missing and does NOT falsely
|
||||
// match a bare year-titled local album.
|
||||
{"3000", "3000"},
|
||||
{"3000 (Remastered)", ""},
|
||||
{"3010 [Deluxe Edition]", ""},
|
||||
{"4000 (Remastered)", ""},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
|
||||
Reference in New Issue
Block a user