X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=t%2Ft7004-tag.sh;h=f160af3ccc8714700218efcd3b38c216ff7bab43;hb=a48aafd31b19cd7b2d1812dc5d207acb50781dfc;hp=d05f4210f2577c43c4ebba5f5daae9598a4e255d;hpb=2dec68cf8fec760930c3bc9d13beb17e381d70a3;p=git.git diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh index d05f4210f..f160af3cc 100755 --- a/t/t7004-tag.sh +++ b/t/t7004-tag.sh @@ -1051,13 +1051,23 @@ test_expect_success \ test_expect_success \ 'message in editor has initial comment' ' - GIT_EDITOR=cat git tag -a initial-comment > actual + ! (GIT_EDITOR=cat git tag -a initial-comment > actual) +' + +test_expect_success \ + 'message in editor has initial comment: first line' ' # check the first line --- should be empty - first=$(sed -e 1q first.expect && + sed -e 1q first.actual && + test_cmp first.expect first.actual +' + +test_expect_success \ + 'message in editor has initial comment: remainder' ' # remove commented lines from the remainder -- should be empty - rest=$(sed -e 1d -e '/^#/d' rest.expect + sed -e 1d -e '/^#/d' rest.actual && + test_cmp rest.expect rest.actual ' get_tag_header reuse $commit commit $time >expect