mirror of
https://github.com/git/git.git
synced 2024-10-30 05:47:53 +01:00
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
This commit is contained in:
commit
39f95df236
1 changed files with 17 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue