Thread (42 messages) flat view 42 messages, 5 authors, 2016-06-15

[PATCHv2 0/5] modernize test style

From: Tom Grennan <hidden>
Date: 2016-06-15 22:53:12

I [off-list ref] wrote:
Per request, the following series modernize the style of the respective
test scripts.  The common themes are:
- Guard setup with test_expect_success
- Single-quoted, tab prefaced test blocks of < 80 cols
- Redirect unwanted output
- Use a "here" filter for some expect generation

I also used pipelines to validate expected results rather than temporary
files, i.e.
TEST | test_cmp expect -
vs.	TEST >actual && test_cmp expect actual

Since the later three patches have a lot of whitespace change, I've included an
alternate, PATCH-w series that filters these for more substantive review.
However, even the filtered series is very large causing me to second guess
whether such style modernization should be pursued; so, I look forward to your
input.
The following series is a much less ambitious modernization of these tests.
This version does NOT:
	- Support running with t/TEST.sh vs. (cd t && ./TEST.sh)
	- Redirect unwanted output
	- Pipeline test_cmp
	- Rewrite blocks to be less than 80 columns 

This version DOES:
	- Guard setup with test_expect_success
	  (in one case, a shell loop was unwound to facilitate this)
	- Single-quoted, tab prefaced test blocks
	- >FILE instead of > FILE redirection style
	- Use a sed filter to process formatted whitespace test cases

I've also included PATCHv2-w for review alternatives.

Thanks,
Tom Grennan (5):
  t7004 (tag): modernize style
  t5512 (ls-remote): modernize style
  t3200 (branch): modernize style
  t0040 (parse-options): modernize style
  t6300 (for-each-ref): modernize style

 t/t7004-tag.sh |  828 ++++++++++++++++++++++++++++++--------------------------
 1 files changed, 447 insertions(+), 381 deletions(-)

-- 
1.7.8
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help