ls-files: update test style
Update test style in t/t30[*].sh for uniformity, that's to keep test title the same line with helper function itself, and fix some indentions. Add a new section "recommended style" in t/README to encourage people to use more modern style in test. Signed-off-by: Li Linchao <lilinchao@oschina.cn> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
e4a4b31577
commit
18337d406f
@ -19,12 +19,12 @@ test_expect_success 'setup' '
|
||||
git commit -m "add foo bar"
|
||||
'
|
||||
|
||||
test_expect_success \
|
||||
'git ls-files --error-unmatch should fail with unmatched path.' \
|
||||
'test_must_fail git ls-files --error-unmatch foo bar-does-not-match'
|
||||
test_expect_success 'git ls-files --error-unmatch should fail with unmatched path.' '
|
||||
test_must_fail git ls-files --error-unmatch foo bar-does-not-match
|
||||
'
|
||||
|
||||
test_expect_success \
|
||||
'git ls-files --error-unmatch should succeed with matched paths.' \
|
||||
'git ls-files --error-unmatch foo bar'
|
||||
test_expect_success 'git ls-files --error-unmatch should succeed with matched paths.' '
|
||||
git ls-files --error-unmatch foo bar
|
||||
'
|
||||
|
||||
test_done
|
||||
|
Reference in New Issue
Block a user