find-testcases works again

I fixed the typo in the code, and added purpose searching