Download raw body.
Regress: accommodate other ls implementations
On Sat, Oct 03, 2020 at 02:08:18PM +0200, Christian Weisgerber wrote:
> accommodate ls -l implementations that print "total 0" in an empty directory
>
> Both FreeBSD and GNU ls(1) behave that way.
>
> The test uses "ls -l" to show that there are no leftover files and
> compares the output to an empty file. We could use something like
> "echo *" instead, but I guess the idea is to see at a glance what's
> up in case of failure.
Yes, makes sense. Thanks.
> diff 016859fc51b660d7fc95ca5eff449d62c67f8a7f /home/naddy/got
> blob - 149f0bdc3cc44d53a90d7d467740210e86263f89
> file + regress/cmdline/rm.sh
> --- regress/cmdline/rm.sh
> +++ regress/cmdline/rm.sh
> @@ -239,7 +239,7 @@ test_rm_directory() {
> return 1
> fi
>
> - (cd $testroot/wt && ls -l > $testroot/stdout)
> + (cd $testroot/wt && ls -l | sed '/^total/d' > $testroot/stdout)
>
> echo -n '' > $testroot/stdout.expected
>
> @@ -251,7 +251,7 @@ test_rm_directory() {
> return 1
> fi
>
> - (cd $testroot/wt && ls -l > $testroot/stdout)
> + (cd $testroot/wt && ls -l | sed '/^total/d' > $testroot/stdout)
>
> echo -n '' > $testroot/stdout.expected
>
> --
> Christian "naddy" Weisgerber naddy@mips.inka.de
>
>
Regress: accommodate other ls implementations