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:
Li Linchao
2022-07-03 15:49:09 +00:00
committed by Junio C Hamano
parent e4a4b31577
commit 18337d406f
5 changed files with 133 additions and 72 deletions

View File

@ -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