Re: [PATCH] Unset TZ in t5000

From: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Date: 2005-06-15 01:17:38
Mark Allen schrieb:
> --- Rene Scharfe <rene.scharfe@lsrfire.ath.cx> wrote:> Mark Allen schrieb:
>  > The expression
> 
>>   length($5)<7 ? $5":00" : $5
>>
>>(where $5 is a time value) is there to cope with tars that format the
>>time like hh:mm instead of the expected hh:mm:ss.
> 
> 
> I put (escaped) parenthesis around the length function and now it works as expected.
> Here's a new patch. Please ack if you approve. 
> 
> Thanks,
> 
> --Mark
> 
> Signed-off-by: Mark Allen <mrallen1@yahoo.com>
> 
> 
> ------------------------------------------------------------------------
> 
> diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh
> --- a/t/t5000-tar-tree.sh
> +++ b/t/t5000-tar-tree.sh
> @@ -50,8 +50,9 @@ test_expect_success \
>  
>  test_expect_success \
>      'validate file modification time' \
> -    'tar tvf b.tar a/a |
> -     awk \{print\ \$4,\ length\(\$5\)\<7\ ?\ \$5\":00\"\ :\ \$5\} >b.mtime &&
> +    'TZ= tar tvf b.tar a/a |
> +     awk \{print\ \$4,\ \(length\(\$5\)\<7\)\ ?\ \$5\":00\"\ :\ \$5\} \
> +     >b.mtime &&
>       echo "2005-05-27 22:00:00" >expected.mtime &&
>       diff expected.mtime b.mtime'
>  

Acked-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Jun 15 01:18:52 2005

This archive was generated by hypermail 2.1.8 : 2005-06-15 01:18:53 EST