Re: [PATCH 1/2] t5530: modernize tests

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

 



Patrick Steinhardt <ps@xxxxxx> writes:

> -D=$(pwd)
> -
> @@ -21,11 +19,7 @@ test_expect_success 'setup and corrupt repository' '
>  	test_tick &&
>  	echo changed >file &&
>  	git commit -a -m changed &&
> -	corrupt_repo HEAD:file
> -
> -'
> -
> -test_expect_success 'fsck fails' '
> +	corrupt_repo HEAD:file &&
>  	test_must_fail git fsck
>  '
>  
> @@ -40,17 +34,12 @@ test_expect_success 'upload-pack fails due to error in pack-objects packing' '
>  '
>  
>  test_expect_success 'corrupt repo differently' '
> -
>  	git hash-object -w file &&
> -	corrupt_repo HEAD^^{tree}
> -
> -'
> -
> -test_expect_success 'fsck fails' '
> +	corrupt_repo HEAD^^{tree} &&
>  	test_must_fail git fsck
>  '

Both changes make sense.

> -test_expect_success 'create empty repository' '
> -
> -	mkdir foo &&
> -	cd foo &&
> -	git init
> -
> -'
> -
>  test_expect_success 'fetch fails' '
> -
> -	test_must_fail git fetch .. main
> -
> +	git init foo &&
> +	test_must_fail git -C foo fetch .. main
>  '

Nice.




[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]

  Powered by Linux