git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Alexandr Miloslavskiy via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [PATCH v3 0/2] Update: fixed typos in commit message
Date: Tue, 24 Sep 2019 03:40:28 -0700 (PDT)	[thread overview]
Message-ID: <pull.347.v3.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.347.v2.git.gitgitgadget@gmail.com>

Commit 1/2: t0028: fix test for UTF-16-LE-BOM Commit 2/2: t0028: add more
tests Please refer to individual commit messages for more information.

Alexandr Miloslavskiy (2):
  t0028: fix test for UTF-16-LE-BOM
  t0028: add more tests

 t/t0028-working-tree-encoding.sh | 41 +++++++++++++++++++++++++++++++-
 1 file changed, 40 insertions(+), 1 deletion(-)


base-commit: 4c86140027f4a0d2caaa3ab4bd8bfc5ce3c11c8a
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-347%2FSyntevoAlex%2F%230189_t0028_fixes-v3
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-347/SyntevoAlex/#0189_t0028_fixes-v3
Pull-Request: https://github.com/gitgitgadget/git/pull/347

Range-diff vs v2:

 1:  d717a60932 ! 1:  438ac961a5 t0028: fix test for UTF-16-LE-BOM
     @@ -3,15 +3,15 @@
          t0028: fix test for UTF-16-LE-BOM
      
          According to its name, the test is designed for UTF-16-LE-BOM.
     -    However, possibly due to copy&paste oversight, it was using UTF-32 file.
     +    However, possibly due to copy&paste oversight, it was using UTF-32.
      
     -    While the test succeeds (probably interprets extra \x00\x00 as embedded
     -    zero), I myself had an unrelated problem which caused the test to fail.
     +    While the test succeeds (extra \000\000 are interpreted as NUL),
     +    I myself had an unrelated problem which caused the test to fail.
          When analyzing the failure I was quite puzzled by the fact that the
          test is obviously bugged. And it seems that I'm not alone:
          https://public-inbox.org/git/CAH8yC8kSakS807d4jc_BtcUJOrcVT4No37AXSz=jePxhw-o9Dg@mail.gmail.com/T/#u
      
     -    This fix changes the test to follow its original intention.
     +    Fix the test to follow its original intention.
      
          Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
      
 2:  40e54cf5ce ! 2:  e4410274e6 t0028: add more tests
     @@ -2,9 +2,9 @@
      
          t0028: add more tests
      
     -    After I discovered that UTF-16-LE-BOM test was bugged and still
     -    succeeded, I decided that better tests are required. Possibly the best
     -    option here is to compare git results against hardcoded ground truth.
     +    After I discovered that UTF-16-LE-BOM test was bugged, I decided that
     +    better tests are required. Possibly the best option here is to compare
     +    git results against hardcoded ground truth.
      
          The new tests also cover more interesting chars where (ANSI != UTF-8).
      
     @@ -25,26 +25,26 @@
      +	orig_string="$2"
      +	expect_bytes="$3"
      +	
     -+	test_expect_success "Commit utf-8, checkout ${encoding}" '
     ++	test_expect_success "Commit UTF-8, checkout $encoding" '
      +		test_when_finished "git checkout HEAD -- .gitattributes" &&
      +		
     -+		test_ext="commit_utf8_checkout_${encoding}" &&
     -+		test_file="test.${test_ext}" &&
     ++		test_ext="commit_utf8_checkout_$encoding" &&
     ++		test_file="test.$test_ext" &&
      +		
     -+		# Commit as utf-8
     -+		echo "*.${test_ext} text working-tree-encoding=utf-8" >.gitattributes &&
     -+		printf "${orig_string}" >"${test_file}" &&
     -+		git add "${test_file}" &&
     ++		# Commit as UTF-8
     ++		echo "*.$test_ext text working-tree-encoding=UTF-8" >.gitattributes &&
     ++		printf "$orig_string" >$test_file &&
     ++		git add $test_file &&
      +		git commit -m "Test data" &&
      +
      +		# Checkout in tested encoding
     -+		rm "${test_file}" &&
     -+		echo "*.${test_ext} text working-tree-encoding=${encoding}" >.gitattributes &&
     -+		git checkout HEAD -- "${test_file}" &&
     ++		rm $test_file &&
     ++		echo "*.$test_ext text working-tree-encoding=$encoding" >.gitattributes &&
     ++		git checkout HEAD -- $test_file &&
      +		
      +		# Test
     -+		printf "${expect_bytes}" > "${test_file}.raw" &&
     -+		test_cmp_bin "${test_file}.raw" "${test_file}"
     ++		printf $expect_bytes >$test_file.raw &&
     ++		test_cmp_bin $test_file.raw $test_file
      +	'
      +}
      +

-- 
gitgitgadget

  parent reply	other threads:[~2019-09-24 10:40 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-23  8:33 [PATCH 0/2] t0028 fix test + more tests Alexandr Miloslavskiy via GitGitGadget
2019-09-23  8:33 ` [PATCH 1/2] t0028: fix test for UTF-16-LE-BOM Alexandr Miloslavskiy via GitGitGadget
2019-09-23  8:33 ` [PATCH 2/2] t0028: add more tests Alexandr Miloslavskiy via GitGitGadget
2019-09-23 10:04 ` [PATCH v2 0/2] Update: fixed typos in commit message Alexandr Miloslavskiy via GitGitGadget
2019-09-23 10:04   ` [PATCH v2 2/2] t0028: add more tests Alexandr Miloslavskiy via GitGitGadget
2019-09-24  4:06     ` Torsten Bögershausen
2019-09-24 10:03       ` Alexandr Miloslavskiy
2019-09-24  6:21     ` Johannes Sixt
2019-09-24 10:31       ` Alexandr Miloslavskiy
2019-09-23 10:04   ` [PATCH v2 1/2] t0028: fix test for UTF-16-LE-BOM Alexandr Miloslavskiy via GitGitGadget
2019-09-24  3:46     ` Torsten Bögershausen
2019-09-24  9:53       ` Alexandr Miloslavskiy
2019-09-24 10:40   ` Alexandr Miloslavskiy via GitGitGadget [this message]
2019-09-24 10:40     ` [PATCH v3 " Alexandr Miloslavskiy via GitGitGadget
2019-09-24 10:40     ` [PATCH v3 2/2] t0028: add more tests Alexandr Miloslavskiy via GitGitGadget
2019-09-28  4:47       ` Junio C Hamano
2019-09-30  7:26         ` Alexandr Miloslavskiy
2019-09-26 19:37     ` [PATCH v3 0/2] Update: fixed typos in commit message Torsten Bögershausen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.347.v3.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).