Alexandre Duret-Lutz <[EMAIL PROTECTED]> writes:

>>>> "EH" == Ed Hartnett <[EMAIL PROTECTED]> writes:
>
>  EH> Should we just use 'ls -l $file' with sed to parse the output for the
>  EH> file size? 
>
> Depending on how portable you want to be, getting the size out of ls -l
> will not be as easy as it seems: see the comments in mdate-sh.
>
>  EH> If so, do we have to check for the existence of ls and sed during the
>  EH> configure? Or is going to be found everywhere?
>
> You can assume them.  (configure wouldn't work if they didn't exist.)
>
>  EH> Or is there some more clever way to check the size of a file?
>
> Sorry for not answering this question (I don't know the answer),
> but why test only the size ?  Isn't the contents important too ?
> If the file isn't too big I'd ship the expected result and
> compare it with `cmp'.  If it's too big you can still compute a
> checksum to compare.

This is one of many tests. This test is being added because of an
obscure bug that, in very unusual circumstances, a data file can be
truncated, and the fact not noticed by the data library.

So the fix involves a function that checks file sizes.

There are also many, many tests relating to file contents. But for
this test, we care about file size.

Thanks!

Ed
-- 
Ed Hartnett  -- [EMAIL PROTECTED]



Reply via email to