All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
To: Johannes Sixt <j6t@kdbg.org>
Cc: Alexandr Miloslavskiy via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v2 2/2] t0028: add more tests
Date: Tue, 24 Sep 2019 12:31:38 +0200	[thread overview]
Message-ID: <9f681989-b2cf-ff66-b2e8-2a2823d5609c@syntevo.com> (raw)
In-Reply-To: <163fcc3c-e827-ad15-5987-a2ae93a0bec2@kdbg.org>

On 24.09.2019 8:21, Johannes Sixt wrote:
> What are we testing here? Is there some back-and-forth conversion going
> on, and are we testing that the conversion happens at all, or that the
> correct conversion/encoding is picked, or that the conversion that is
> finally chosen is correct? Why does it help to test more interesting
> chars (and would you not also regard codepoints outside the BMP the most
> interesting because they require surrogate codepoints in UTF-16)?

According to my understanding (I'm not the author of test package),
it is designed to test that various encodings are properly supported
by git in the working tree.

The new tests are designed to avoid any back-and-forth, which actually
happened for the previous UTF-16-LE-BOM test, which in turn hidden
that the test was bugged.

Otherwise, the test verifies that if you requested some encoding, you
get exactly that, and it covers various potential problems at once.

 > Why does it help to test more interesting chars (and would you not
 > also regard codepoints outside the BMP the most interesting because
 > they require surrogate codepoints in UTF-16)?
					
It helps to cover more potential problems. One could agree that
converting latin characters is mostly about padding/dropping zero
chars, but this approach could never work for the chars I used. As for
"outside the BMP", I'm simply not experienced with that. If you are,
you're welcome to further improve the tests I added.


  reply	other threads:[~2019-09-24 10:31 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 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-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 [this message]
2019-09-24 10:40   ` [PATCH v3 0/2] Update: fixed typos in commit message Alexandr Miloslavskiy via GitGitGadget
2019-09-24 10:40     ` [PATCH v3 1/2] t0028: fix test for UTF-16-LE-BOM 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

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

  git send-email \
    --in-reply-to=9f681989-b2cf-ff66-b2e8-2a2823d5609c@syntevo.com \
    --to=alexandr.miloslavskiy@syntevo.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=j6t@kdbg.org \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.