Update of /cvsroot/fink/fink/t/Services In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14934/t/Services
Modified Files: ChangeLog eval_conditional.t Added Files: version_cmp.t Log Message: Fix typo in eval_conditional.t and add test cases for version_cmp Index: eval_conditional.t =================================================================== RCS file: /cvsroot/fink/fink/t/Services/eval_conditional.t,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- eval_conditional.t 1 Aug 2004 12:41:56 -0000 1.1 +++ eval_conditional.t 21 Sep 2009 15:57:09 -0000 1.2 @@ -26,7 +26,7 @@ ) { for( my $setnum=0; $setnum<@stringsets; $setnum++ ) { my $test = $stringsets[$setnum]->[0] . " " . $optest->[0] . " " . $stringsets[$setnum]->[1]; - cmp_ok( &eval_conditional( $test, "eval_consitional.t" ), + cmp_ok( &eval_conditional( $test, "eval_conditional.t" ), '==', $optest->[1]->[$setnum], $test ); --- NEW FILE: version_cmp.t --- #!/usr/bin/perl -w use strict; use Test::More 'no_plan'; BEGIN { use_ok( 'Fink::Services', qw(version_cmp) ) }; # "str1 op str2" forms my @stringsets = ( [qw/ a b /], [qw/ b b /], [qw/ b a /], [ 0, 1 ], [ 10, 2 ], [qw/ abc ab /], # longer strings are higher ); foreach my $optest ( # each list is $op then ref to list of results parallelling @stringsets [ ">>" => [ 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1 ] ], [ "<<" => [ 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 ] ], [ ">=" => [ 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1 ] ], [ "<=" => [ 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0 ] ], [ "=" => [ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] ], ) { for( my $setnum=0; $setnum<@stringsets; $setnum++ ) { my $test = $stringsets[$setnum]->[0] . " " . $optest->[0] . " " . $stringsets[$setnum]->[1]; cmp_ok( &version_cmp( $stringsets[$setnum]->[0], $optest->[0], $stringsets[$setnum]->[1] ), '==', $optest->[1]->[$setnum], $test ); } } Index: ChangeLog =================================================================== RCS file: /cvsroot/fink/fink/t/Services/ChangeLog,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- ChangeLog 26 Apr 2006 04:35:56 -0000 1.20 +++ ChangeLog 21 Sep 2009 15:57:09 -0000 1.21 @@ -1,3 +1,8 @@ +2009-09-21 Max Horn <m...@quendi.de> + + * eval_conditional.t: Fix typo. + * version_cmp.t: Add test cases for version_cmp. + 2006-02-24 Daniel Macks <dma...@netspace.org> * execute_nonroot_okay.t: Fix pathnames so local copy is actually in @INC ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Fink-commits mailing list Fink-commits@lists.sourceforge.net http://news.gmane.org/gmane.os.apple.fink.cvs