Am Sonntag, 16.11.03 um 14:33 Uhr schrieb Michael G Schwern:
On Sun, Nov 16, 2003 at 05:15:35AM -0800, Max Horn wrote:--- get_perl.t 15 Nov 2003 11:57:59 -0000 1.3 +++ get_perl.t 16 Nov 2003 13:15:33 -0000 1.4 @@ -16,7 +16,13 @@ isa_ok( $pv, 'Fink::PkgVersion' );
my($perldir, $perlarch) = $pv->get_perl_dir_arch;
-#like( $perldir, qr{^/ 5 \. \d{1,2} \. \d{1,2} $}x );
+
+# The following test is somewhat questionable, since it imposes a rather
+# strict limitation on a directory name which potentially can be of
+# arbitrary form. As such it may have to be adapted when/if get_perl_dir_arch()
+# is changed in the future.
+like( $perldir, qr{^(/ 5 \. \d{1,2} \. \d{1,2} )?$}x );
Come now, that's just silly. That regex will handle every version of Perl
from 5.6 to 5.99.99. Are you really worried about 6.0 or 5.100?
Nah. Just worried about the fact that one day we may have yet another completely different layout to follow :-). But yeah you are right, it's sufficient to test what we have now. I see you already removed my comment, else I would have done so now.
The
$perlarch test is equally questionable in that it assumes we'll always be
running on darwin. What if fink ports to Windows?! Oh no! ;)
Oh no indeed :-)
[...]
Finally, that's *not* why the test is questionable. Its because it assumedFine. Thanks.
there's *always* going to be a version directory returned. That's the way
the code was written before. Now the behavior has changed. Change the
test to match. Its really very simple. I'll do this one.
But note, as long as we don't incorporate the tests into our development model, they will keep on getting broken. So far we haven't yet agreed as a team to actually regularly use the tests. If you want to achieve that, you may want to make some advertisement, and try to convince people to always run "make test" before they commit changes (or even better, write additional tests :-). At this moment, the tests are still very much your personal domain. Not sure if anybody except maybe Ben, you and me actually is aware of them :-)
Max
------------------------------------------------------- This SF. Net email is sponsored by: GoToMyPC GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free! https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl _______________________________________________ Fink-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/fink-devel