On 2010-09-04 11:36, James Youngman wrote:
> On Thu, Sep 2, 2010 at 1:01 AM, Nick <[email protected]> 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 --da...@$sec 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