Update of /cvsroot/fink/fink/t/Command
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8265/t/Command

Modified Files:
      Tag: dist-up-branch
        ChangeLog du_sk.t 
Log Message:
sync w head, dist-up-branch-10

Index: ChangeLog
===================================================================
RCS file: /cvsroot/fink/fink/t/Command/ChangeLog,v
retrieving revision 1.1
retrieving revision 1.1.22.1
diff -u -d -r1.1 -r1.1.22.1
--- ChangeLog   17 Mar 2004 00:20:13 -0000      1.1
+++ ChangeLog   11 Nov 2005 21:00:42 -0000      1.1.22.1
@@ -1,3 +1,8 @@
+2005-08-21  Dave Vasilevsky  <[EMAIL PROTECTED]>
+
+       * du_sk.t: Allow for a certain amount of error in list test, to account
+       for rounding on filesystems with block sizes < 1K.
+
 2004-03-16  Dave Vasilevsky  <[EMAIL PROTECTED]>
 
        * du_sk.t: New test for &du_sk, replacement for 'du -sk'

Index: du_sk.t
===================================================================
RCS file: /cvsroot/fink/fink/t/Command/du_sk.t,v
retrieving revision 1.2
retrieving revision 1.2.22.1
diff -u -d -r1.2 -r1.2.22.1
--- du_sk.t     18 Mar 2004 09:41:19 -0000      1.2
+++ du_sk.t     11 Nov 2005 21:00:42 -0000      1.2.22.1
@@ -27,5 +27,13 @@
 # User better not touch anything for a moment
 (my $dirsize = `/usr/bin/du -sk .`) =~ s/\D.*$//s;
 is( du_sk('.'), $dirsize, "agrees with du");                                   
                # 4
-is( du_sk(qw(. .)), 2 * $dirsize, "works on lists");                           
        # 5
+
+# If block size is less than 1K, then rounding effects can cause size of
+# $dir twice to not equal twice size of $dir.
+my @ok_sizes = (2 * $dirsize);
+push @ok_sizes, 2 * $dirsize - 1 if $smallsize == 1;
+my $listsize = du_sk(qw(. .));
+ok( (grep { $_ == $listsize } @ok_sizes) , "works on lists");                  
        # 5
+
+
 is( du_sk(), 0, "works with no arguments");                                    
                        # 6



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to