mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 16:59:12 +00:00
refactor(wildcard): optimize and add caching (#1634)
* fix(wildcard): avoid excessive allocations every loop * are you going to Scarborough Fair? * ruby ruby ruby ruby * ride on, little murphy * shirley? * to the moon * reggie are you there? * code 99 * my doctorate is in Art History * helps to be consistent * tidy * slow and steady gets the clam * oysters were better anyway * DIAL TONE
This commit is contained in:
parent
bc0f4cc055
commit
982f7ddf68
13 changed files with 177 additions and 60 deletions
|
@ -29,6 +29,36 @@ func TestMatch(t *testing.T) {
|
|||
text: "The.Simps.S12",
|
||||
matched: false,
|
||||
},
|
||||
{
|
||||
pattern: "The?Simp",
|
||||
text: "The.Simps.S12",
|
||||
matched: false,
|
||||
},
|
||||
{
|
||||
pattern: "The?Simp",
|
||||
text: "The.Simps.S12",
|
||||
matched: false,
|
||||
},
|
||||
{
|
||||
pattern: "The*Simp",
|
||||
text: "The.Simp",
|
||||
matched: true,
|
||||
},
|
||||
{
|
||||
pattern: "*tv*",
|
||||
text: "tv",
|
||||
matched: true,
|
||||
},
|
||||
{
|
||||
pattern: "*EPUB*",
|
||||
text: "Translated (Group) / EPUB",
|
||||
matched: true,
|
||||
},
|
||||
{
|
||||
pattern: "*shift*",
|
||||
text: "Good show shift S02 2160p ATVP WEB-DL DDP 5.1 Atmos DV HEVC-GROUP",
|
||||
matched: true,
|
||||
},
|
||||
}
|
||||
// Iterating over the test cases, call the function under test and asert the output.
|
||||
for i, testCase := range testCases {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue