X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft7500-commit.sh;h=1c908f4d3966cb9a2769465652981bef831f312d;hb=2f80de956f71880b000933b1b9bff4991c5b3ca9;hp=5976f598fc7bf48120865eca3ceef74a151e717a;hpb=df0a6aeb35be7855fc96417cd01dce3e8e5146f5;p=git.git diff --git a/t/t7500-commit.sh b/t/t7500-commit.sh index 5976f598f..1c908f4d3 100755 --- a/t/t7500-commit.sh +++ b/t/t7500-commit.sh @@ -15,7 +15,7 @@ commit_msg_is () { printf "%s" "$(git log --pretty=format:%s%b -1)" >$expect && printf "%s" "$1" >$actual && - test_cmp $expect $actual + test_i18ncmp $expect $actual } # A sanity check to see if commit is working at all. @@ -123,6 +123,20 @@ test_expect_success 'commit message from file should override template' ' commit_msg_is "standard input msg" ' +cat >"$TEMPLATE" <<\EOF + + +### template + +EOF +test_expect_success 'commit message from template with whitespace issue' ' + echo "content galore" >>foo && + git add foo && + GIT_EDITOR="$TEST_DIRECTORY"/t7500/add-whitespaced-content git commit \ + --template "$TEMPLATE" && + commit_msg_is "commit message" +' + test_expect_success 'using alternate GIT_INDEX_FILE (1)' ' cp .git/index saved-index &&