Re: [PATCH] t/t7300: workaround ancient touch by rearranging arguments

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

 



Brandon Casey <casey@xxxxxxxxxxxxxxx> writes:

> From: Brandon Casey <drafnel@xxxxxxxxx>
>
> The ancient touch on Solaris 7 thinks that a decimal number supplied as
> the first argument specifies a date_time to give to the files specified by
> the remaining arguments.  In this case, it fails to parse '1' as a proper
> date_time and exits with a failure status.  Workaround this flaw by
> rearranging the arguments supplied to touch so that a non-digit appears
> first and touch will not be confused.
>
> Signed-off-by: Brandon Casey <casey@xxxxxxxxxxxxxxx>

Yuck, there were other reasons why I tend to write ">file" in our tests,
just to create a new and empty file, but I didn't remember seeing this
one.  It's been a while since I touched Solaris the last time.

Thanks for catching.

>  t/t7300-clean.sh |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh
> index 7dbbea1..6c776e9 100755
> --- a/t/t7300-clean.sh
> +++ b/t/t7300-clean.sh
> @@ -443,7 +443,7 @@ test_expect_success 'git clean -e' '
>  	(
>  		cd repo &&
>  		git init &&
> -		touch 1 2 3 known &&
> +		touch known 1 2 3 &&
>  		git add known &&
>  		git clean -f -e 1 -e 2 &&
>  		test -e 1 &&
> -- 
> 1.7.2.1
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]