Skip to content

Commit

Permalink
Update t7001-mv.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
fobiasic07 committed Oct 26, 2022
1 parent 373cb44 commit 034c75d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions t/t7001-mv.sh
Expand Up @@ -60,8 +60,8 @@ test_expect_success 'checking the commit' '

test_expect_success 'mv --dry-run does not move file' '
git mv -n path0/COPYING MOVED &&
! test_path_is_file path0/COPYING &&
test_path_is_file MOVED
test_path_is_file path0/COPYING &&
! test_path_is_file MOVED
'

test_expect_success 'checking -k on non-existing file' '
Expand All @@ -72,22 +72,22 @@ test_expect_success 'checking -k on untracked file' '
>untracked1 &&
git mv -k untracked1 path0 &&
test_path_is_file untracked1 &&
test_path_is_file path0/untracked1
! test_path_is_file path0/untracked1
'

test_expect_success 'checking -k on multiple untracked files' '
>untracked2 &&
git mv -k untracked1 untracked2 path0 &&
test_path_is_file untracked1 &&
test_path_is_file untracked2 &&
test_path_is_file path0/untracked1 &&
test_path_is_file path0/untracked2
! test_path_is_file path0/untracked1 &&
! test_path_is_file path0/untracked2
'

test_expect_success 'checking -f on untracked file with existing target' '
>path0/untracked1 &&
test_must_fail git mv -f untracked1 path0 &&
test_path_is_file .git/index.lock &&
! test_path_is_file .git/index.lock &&
test_path_is_file untracked1 &&
test_path_is_file path0/untracked1
'
Expand Down

0 comments on commit 034c75d

Please sign in to comment.