mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 08:39:17 +01:00
Add unit tests to test new feat. X detection regex
The previous version of the `plugins.feat_tokens` regular expression only matched "feat. X" parts if preceded by a space. This caused missed detections in the `ftintitle.contains_feat` function. This commit adds unit tests for the updated regex that also matches "feat. X" parts within parentheses and brackets
This commit is contained in:
parent
8c60d2b960
commit
6c8bd424e8
1 changed files with 5 additions and 0 deletions
|
|
@ -183,5 +183,10 @@ class FtInTitlePluginTest(unittest.TestCase):
|
|||
assert ftintitle.contains_feat("Alice & Bob")
|
||||
assert ftintitle.contains_feat("Alice and Bob")
|
||||
assert ftintitle.contains_feat("Alice With Bob")
|
||||
assert ftintitle.contains_feat("Alice (ft. Bob)")
|
||||
assert ftintitle.contains_feat("Alice (feat. Bob)")
|
||||
assert ftintitle.contains_feat("Alice [ft. Bob]")
|
||||
assert ftintitle.contains_feat("Alice [feat. Bob]")
|
||||
assert not ftintitle.contains_feat("Alice defeat Bob")
|
||||
assert not ftintitle.contains_feat("Aliceft.Bob")
|
||||
assert not ftintitle.contains_feat("Alice (defeat Bob)")
|
||||
|
|
|
|||
Loading…
Reference in a new issue