Re: [PATCH] diff: add tests for --relative without optional prefix value

2017-12-07 Thread Jacob Keller
On Thu, Dec 7, 2017 at 1:50 PM, Junio C Hamano wrote: > Jeff King writes: > >> On Thu, Dec 07, 2017 at 11:01:35AM -0800, Jacob Keller wrote: >> >>> From: Jacob Keller >>> >>> We already have tests for --relative, but they currently only test when >>> a prefix has been provided. This fails to tes

Re: [PATCH] diff: add tests for --relative without optional prefix value

2017-12-07 Thread Junio C Hamano
Jeff King writes: > On Thu, Dec 07, 2017 at 11:01:35AM -0800, Jacob Keller wrote: > >> From: Jacob Keller >> >> We already have tests for --relative, but they currently only test when >> a prefix has been provided. This fails to test the case where --relative >> by itself should use the current

Re: [PATCH] diff: add tests for --relative without optional prefix value

2017-12-07 Thread Jacob Keller
On Thu, Dec 7, 2017 at 1:12 PM, Jeff King wrote: > On Thu, Dec 07, 2017 at 11:01:35AM -0800, Jacob Keller wrote: > >> From: Jacob Keller >> >> We already have tests for --relative, but they currently only test when >> a prefix has been provided. This fails to test the case where --relative >> by

Re: [PATCH] diff: add tests for --relative without optional prefix value

2017-12-07 Thread Jeff King
On Thu, Dec 07, 2017 at 11:01:35AM -0800, Jacob Keller wrote: > From: Jacob Keller > > We already have tests for --relative, but they currently only test when > a prefix has been provided. This fails to test the case where --relative > by itself should use the current directory as the prefix. >

Re: [PATCH] diff: add tests for --relative without optional prefix value

2017-12-07 Thread Jacob Keller
On Thu, Dec 7, 2017 at 11:17 AM, Junio C Hamano wrote: > Jacob Keller writes: > >> for type in diff numstat stat raw; do >> - check_$type file2 --relative=subdir/ >> - check_$type file2 --relative=subdir >> - check_$type dir/file2 --relative=sub >> + check_$type . file2 --relativ

Re: [PATCH] diff: add tests for --relative without optional prefix value

2017-12-07 Thread Junio C Hamano
Jacob Keller writes: > for type in diff numstat stat raw; do > - check_$type file2 --relative=subdir/ > - check_$type file2 --relative=subdir > - check_$type dir/file2 --relative=sub > + check_$type . file2 --relative=subdir/ > + check_$type . file2 --relative=subdir > +

[PATCH] diff: add tests for --relative without optional prefix value

2017-12-07 Thread Jacob Keller
From: Jacob Keller We already have tests for --relative, but they currently only test when a prefix has been provided. This fails to test the case where --relative by itself should use the current directory as the prefix. Teach the check_$type functions to take a directory argument to indicate w