diff options
Diffstat (limited to 't')
-rw-r--r-- | t/README | 4 | ||||
-rwxr-xr-x | t/t3400-rebase.sh | 16 | ||||
-rwxr-xr-x | t/t3404-rebase-interactive.sh | 9 |
3 files changed, 19 insertions, 10 deletions
@@ -379,10 +379,6 @@ the --no-sparse command-line argument. GIT_TEST_PRELOAD_INDEX=<boolean> exercises the preload-index code path by overriding the minimum number of cache entries required per thread. -GIT_TEST_REBASE_USE_BUILTIN=<boolean>, when false, disables the -builtin version of git-rebase. See 'rebase.useBuiltin' in -git-config(1). - GIT_TEST_INDEX_THREADS=<n> enables exercising the multi-threaded loading of the index for the whole test suite by bypassing the default number of cache entries and thread minimums. Setting this to 1 will make the diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh index 3e73f7584c..a809de9304 100755 --- a/t/t3400-rebase.sh +++ b/t/t3400-rebase.sh @@ -311,4 +311,20 @@ test_expect_success 'rebase--merge.sh and --show-current-patch' ' ) ' +test_expect_success 'rebase -c rebase.useBuiltin=false warning' ' + expected="rebase.useBuiltin support has been removed" && + + # Only warn when the legacy rebase is requested... + test_must_fail git -c rebase.useBuiltin=false rebase 2>err && + test_i18ngrep "$expected" err && + test_must_fail env GIT_TEST_REBASE_USE_BUILTIN=false git rebase 2>err && + test_i18ngrep "$expected" err && + + # ...not when we would have used the built-in anyway + test_must_fail git -c rebase.useBuiltin=true rebase 2>err && + test_must_be_empty err && + test_must_fail env GIT_TEST_REBASE_USE_BUILTIN=true git rebase 2>err && + test_must_be_empty err +' + test_done diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index b60b11f9f2..1723e1a858 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -149,12 +149,10 @@ test_expect_success 'rebase -i with the exec command checks tree cleanness' ' test_expect_success 'rebase -x with empty command fails' ' test_when_finished "git rebase --abort ||:" && - test_must_fail env GIT_TEST_REBASE_USE_BUILTIN=true \ - git rebase -x "" @ 2>actual && + test_must_fail env git rebase -x "" @ 2>actual && test_write_lines "error: empty exec command" >expected && test_i18ncmp expected actual && - test_must_fail env GIT_TEST_REBASE_USE_BUILTIN=true \ - git rebase -x " " @ 2>actual && + test_must_fail env git rebase -x " " @ 2>actual && test_i18ncmp expected actual ' @@ -162,8 +160,7 @@ LF=' ' test_expect_success 'rebase -x with newline in command fails' ' test_when_finished "git rebase --abort ||:" && - test_must_fail env GIT_TEST_REBASE_USE_BUILTIN=true \ - git rebase -x "a${LF}b" @ 2>actual && + test_must_fail env git rebase -x "a${LF}b" @ 2>actual && test_write_lines "error: exec commands cannot contain newlines" \ >expected && test_i18ncmp expected actual |