dlclark / regexp2

A full-featured regex engine in pure Go based on the .NET engine
MIT License
997 stars 84 forks source link

fix Incorrect timeout error when using FindStringMatch() #86

Open Brinenas opened 3 months ago

Brinenas commented 3 months ago

fix Timeout Error issue: when the fastclock stop running, then next matches will get a wrong fast.current and daeline, thus trigger an incorrect timeout error.

Brinenas commented 3 months ago

Add a new UT, If you comment the add code, the ut will failed.

dlclark commented 3 months ago

Thanks for submitting this. Can you add an integration-level test showing the behavior fix from the API consumer perspective?

Brinenas commented 3 months ago

Add a new UT for my own case. Maybe you guys can add a more elegant test.

dlclark commented 3 months ago

@Brinenas a couple issues I see:

I did a couple other small tweaks to the test as well. Let me know if you see any issues with my change.