diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-12-01 01:49:41 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-12-01 01:49:41 +0300 |
commit | 39f95df236864e8a5227a53aedd3ee760b741e55 (patch) | |
tree | a947ce7fc25c12ed3f27752da99fc4be2c914798 /t | |
parent | e67fbf927dfdf13d0b21dc6ea15dc3c7ef448ea0 (diff) | |
parent | b6e2a4f07c238e179e4d358e84a7f9e3a5c07005 (diff) |
Merge branch 'js/t2106-cleanup'
A test script got cleaned up and then made not to depend on the
value of init.defaultBranch.
* js/t2106-cleanup:
t2106: ensure that the checkout fails for the expected reason
t2106: make test independent of the current main branch name
t2106: adjust style to the current conventions
Diffstat (limited to 't')
-rwxr-xr-x | t/t2106-update-index-assume-unchanged.sh | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/t/t2106-update-index-assume-unchanged.sh b/t/t2106-update-index-assume-unchanged.sh index 99d858c6b7..2d450daf5c 100755 --- a/t/t2106-update-index-assume-unchanged.sh +++ b/t/t2106-update-index-assume-unchanged.sh @@ -5,20 +5,23 @@ test_description='git update-index --assume-unchanged test. . ./test-lib.sh -test_expect_success 'setup' \ - ': >file && - git add file && - git commit -m initial && - git branch other && - echo upstream >file && - git add file && - git commit -m upstream' +test_expect_success 'setup' ' + : >file && + git add file && + git commit -m initial && + git branch other && + echo upstream >file && + git add file && + git commit -m upstream +' -test_expect_success 'do not switch branches with dirty file' \ - 'git reset --hard && - git checkout other && - echo dirt >file && - git update-index --assume-unchanged file && - test_must_fail git checkout master' +test_expect_success 'do not switch branches with dirty file' ' + git reset --hard && + git checkout other && + echo dirt >file && + git update-index --assume-unchanged file && + test_must_fail git checkout - 2>err && + test_i18ngrep overwritten err +' test_done |