diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-01-23 21:39:49 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-01-23 21:39:50 (GMT) |
commit | b26956351209415520487c036541d58c2fd7ef2d (patch) | |
tree | 7ecff17da815abc6a6cc901d9f051c1ba948994a /t | |
parent | 8844c1125eae13a9e9dc7d68909cc73497e8d4b0 (diff) | |
parent | dcb47e52b00c594625e55917626780e53da583ef (diff) | |
download | git-b26956351209415520487c036541d58c2fd7ef2d.zip git-b26956351209415520487c036541d58c2fd7ef2d.tar.gz git-b26956351209415520487c036541d58c2fd7ef2d.tar.bz2 |
Merge branch 'en/t6426-todo-cleanup'
Test clean-up.
* en/t6426-todo-cleanup:
t6426: fix TODO about making test more comprehensive
Diffstat (limited to 't')
-rwxr-xr-x | t/t6426-merge-skip-unneeded-updates.sh | 58 |
1 files changed, 23 insertions, 35 deletions
diff --git a/t/t6426-merge-skip-unneeded-updates.sh b/t/t6426-merge-skip-unneeded-updates.sh index 2bb8e7f..fd21c1a 100755 --- a/t/t6426-merge-skip-unneeded-updates.sh +++ b/t/t6426-merge-skip-unneeded-updates.sh @@ -378,42 +378,30 @@ test_expect_success '2c: Modify b & add c VS rename b->c' ' test_i18ngrep "CONFLICT (.*/add):" out && test_must_be_empty err && - # Make sure c WAS updated + git ls-files -s >index_files && + test_line_count = 2 index_files && + + # Ensure b was removed + test_path_is_missing b && + + # Make sure c WAS updated... test-tool chmtime --get c >new-mtime && - test $(cat old-mtime) -lt $(cat new-mtime) - - # FIXME: rename/add conflicts are horribly broken right now; - # when I get back to my patch series fixing it and - # rename/rename(2to1) conflicts to bring them in line with - # how add/add conflicts behave, then checks like the below - # could be added. But that patch series is waiting until - # the rename-directory-detection series lands, which this - # is part of. And in the mean time, I do not want to further - # enforce broken behavior. So for now, the main test is the - # one above that err is an empty file. - - #git ls-files -s >index_files && - #test_line_count = 2 index_files && - - #git rev-parse >actual :2:c :3:c && - #git rev-parse >expect A:b A:c && - #test_cmp expect actual && - - #git cat-file -p A:b >>merged && - #git cat-file -p A:c >>merge-me && - #>empty && - #test_must_fail git merge-file \ - # -L "Temporary merge branch 1" \ - # -L "" \ - # -L "Temporary merge branch 2" \ - # merged empty merge-me && - #sed -e "s/^\([<=>]\)/\1\1\1/" merged >merged-internal && - - #git hash-object c >actual && - #git hash-object merged-internal >expect && - #test_cmp expect actual && - - #test_path_is_missing b + test $(cat old-mtime) -lt $(cat new-mtime) && + + # ...and has correct index entries and working tree contents + git rev-parse >actual :2:c :3:c && + git rev-parse >expect A:c A:b && + test_cmp expect actual && + + git cat-file -p A:b >>merge-me && + git cat-file -p A:c >>merged && + >empty && + test_must_fail git merge-file \ + -L "HEAD" \ + -L "" \ + -L "B^0" \ + merged empty merge-me && + test_cmp merged c ) ' |