diff options
| author | David Aguilar <davvid@gmail.com> | 2025-02-01 13:33:18 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-02-03 15:22:03 -0800 |
| commit | e21bf2c4314840dba4f45c6e7bbc96a6fc0a8f61 (patch) | |
| tree | 9aacc42855bb7000f1d7413b1c1fc81c9f1e0e6a /t | |
| parent | a0fc18f0427fa9e4bd04cae60bee346b6ae78663 (diff) | |
| download | git-e21bf2c4314840dba4f45c6e7bbc96a6fc0a8f61.tar.gz | |
help: show the suggested command when help.autocorrect is false
Make the handling of false boolean values for help.autocorrect
consistent with the handling of value 0 by showing the suggested
commands but not running them.
Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
| -rwxr-xr-x | t/t9003-help-autocorrect.sh | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/t/t9003-help-autocorrect.sh b/t/t9003-help-autocorrect.sh index 85a5074b5e..5ebfc00f52 100755 --- a/t/t9003-help-autocorrect.sh +++ b/t/t9003-help-autocorrect.sh @@ -28,15 +28,18 @@ test_expect_success 'setup' ' test_cmp expect actual ' -test_expect_success 'autocorrect showing candidates' ' - git config help.autocorrect 0 && +for show in false no off 0 +do + test_expect_success 'autocorrect showing candidates' ' + git config help.autocorrect $show && - test_must_fail git lfg 2>actual && - grep "^ lgf" actual && + test_must_fail git lfg 2>actual && + grep "^ lgf" actual && - test_must_fail git distimdist 2>actual && - grep "^ distimdistim" actual -' + test_must_fail git distimdist 2>actual && + grep "^ distimdistim" actual + ' +done for immediate in -1 immediate do |
