Re: [PATCH v2 07/24] multi-pack-index: expand test data

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

 



Derrick Stolee <stolee@xxxxxxxxx> writes:

>  test_expect_success 'write midx with no packs' '
> +	test_when_finished rm pack/multi-pack-index &&

It is generally a good idea to give "-f" to "rm" used in
test_when_finished.  The main command sequence may have failed
before it has a chance to create that file; even though an error
will be ignored by the when_finished handler, it is a good code
hygiene to mark expected condition (e.g. the file to be removed may
not exist at this point) to signal to future readers that the author
knew what s/he was writing.

>  	git multi-pack-index --object-dir=. write &&
>  	test_path_is_file pack/multi-pack-index &&
>  	midx_read_expect
>  '
>  
> +test_expect_success 'create objects' '
> +	for i in `test_seq 1 5`

Please write it as "$(test_seq 1 5)"

> +	do
> +		iii=$(printf '%03i' $i)
> +		test-tool genrandom "bar" 200 > wide_delta_$iii &&

	test-tool genrandom "bar" 200 >"wide_delta_$iii" &&

i.e. no SP between the redirection operator and the target file
name.  Also dq around target file name that depends on variable
substitution to tell bash that we know what we are doing (some
vintage of bash will throw warning at us unless we do so).




[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