Every package that you distribute via CPAN or internally should come with a bunch of tests. There should be a directory called t/ and within that directory there should be files with .t extension.