From 1b593e1ea4d2af0f6444d9a7788d5d99abd6fde5 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sat, 11 Jan 2020 23:36:56 +0000 Subject: Squashed 'third_party/git/' content from commit cb71568594 git-subtree-dir: third_party/git git-subtree-split: cb715685942260375e1eb8153b0768a376e4ece7 --- t/t8005-blame-i18n.sh | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100755 t/t8005-blame-i18n.sh (limited to 't/t8005-blame-i18n.sh') diff --git a/t/t8005-blame-i18n.sh b/t/t8005-blame-i18n.sh new file mode 100755 index 000000000000..75da219ed1be --- /dev/null +++ b/t/t8005-blame-i18n.sh @@ -0,0 +1,96 @@ +#!/bin/sh + +test_description='git blame encoding conversion' +. ./test-lib.sh + +. "$TEST_DIRECTORY"/t8005/utf8.txt +. "$TEST_DIRECTORY"/t8005/euc-japan.txt +. "$TEST_DIRECTORY"/t8005/sjis.txt + +test_expect_success 'setup the repository' ' + # Create the file + echo "UTF-8 LINE" > file && + git add file && + git commit --author "$UTF8_NAME " -m "$UTF8_MSG" && + + echo "EUC-JAPAN LINE" >> file && + git add file && + git config i18n.commitencoding eucJP && + git commit --author "$EUC_JAPAN_NAME " -m "$EUC_JAPAN_MSG" && + + echo "SJIS LINE" >> file && + git add file && + git config i18n.commitencoding SJIS && + git commit --author "$SJIS_NAME " -m "$SJIS_MSG" +' + +cat >expected <output && + filter_author_summary output >actual && + test_cmp expected actual +' + +cat >expected <output && + filter_author_summary output >actual && + test_cmp expected actual +' + +cat >expected <output && + filter_author_summary output >actual && + test_cmp expected actual +' + +cat >expected <output && + filter_author_summary output >actual && + test_cmp expected actual +' + +test_done -- cgit 1.4.1