diff options
Diffstat (limited to 't/t9003-help-autocorrect.sh')
-rwxr-xr-x | t/t9003-help-autocorrect.sh | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/t/t9003-help-autocorrect.sh b/t/t9003-help-autocorrect.sh index b1c7919c4a..f00deaf381 100755 --- a/t/t9003-help-autocorrect.sh +++ b/t/t9003-help-autocorrect.sh @@ -37,16 +37,27 @@ test_expect_success 'autocorrect showing candidates' ' grep "^ distimdistim" actual ' -test_expect_success 'autocorrect running commands' ' - git config help.autocorrect -1 && +for immediate in -1 immediate +do + test_expect_success 'autocorrect running commands' ' + git config help.autocorrect $immediate && - git lfg >actual && - echo "a single log entry" >expect && - test_cmp expect actual && + git lfg >actual && + echo "a single log entry" >expect && + test_cmp expect actual && - git distimdist >actual && - echo "distimdistim was called" >expect && - test_cmp expect actual + git distimdist >actual && + echo "distimdistim was called" >expect && + test_cmp expect actual + ' +done + +test_expect_success 'autocorrect can be declined altogether' ' + git config help.autocorrect never && + + test_must_fail git lfg 2>actual && + grep "is not a git command" actual && + test_line_count = 1 actual ' test_done |