bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question on "enhancements wanted for findutils"


From: Nick
Subject: Re: Question on "enhancements wanted for findutils"
Date: Fri, 10 Sep 2010 19:25:42 -0700
User-agent: Mutt/1.5.20 (2009-06-14)

On 2010-09-04 11:36, James Youngman wrote:
> On Thu, Sep 2, 2010 at 1:01 AM, Nick <address@hidden> wrote:
> >  - the item 'Add tests which allow [acm]time to be compared against a
> >   specified timestamp' seems already available by using -newerXt, or
> >   do I misunderstand?
> 
> I guess "tests" is a little ambiguous.   The regression test suite
> does not test -mtime and friends, but it should.

Is this along the right lines?  I started with 'amin' because it's at
the top of excuses.txt.

   $ pwd
   /home/nick/findutils/find

   $ cat testsuite/find.gnu/amin.exp 

   exec rm -rf tmp.amin
   exec mkdir tmp.amin

   # Touch the files in the setup phase, to make sure sec_since_epoch
   # is as recent as possible.
   proc prep {} {
       set sec_since_epoch [clock seconds]
       for {set i 0} {$i < 10} {incr i} {
           set sec [expr $sec_since_epoch - 60 * $i]
           exec touch address@hidden tmp.amin/min-$i.test
       }
   }
   find_start p { tmp.amin -type f -amin -3 } "" "" prep

   exec rm -rf tmp.amin

   $ cat testsuite/find.gnu/amin.xo
   tmp.amin/min-0.test
   tmp.amin/min-1.test
   tmp.amin/min-2.test

Thanks
-- 
Nick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]