git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 2/2] t0028: add more tests

From
AMAlexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
Date
Sep 24, 2019, 10:31 UTC
Message-ID
<9f681989-b2cf-ff66-b2e8-2a2823d5609c@syntevo.com>
In-Reply-To
<163fcc3c-e827-ad15-5987-a2ae93a0bec2@kdbg.org>
On 24.09.2019 8:21, Johannes Sixt wrote:
Show 6 quoted lines
> 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.
Previous: Johannes SixtNext: Alexandr Miloslavskiy via GitGitGadget
Message 12 of 18 in “t0028 fix test + more tests”
  1. 0/2 t0028 fix test + more testsAlexandr Miloslavskiy via GitGitGadget, Sep 23, 2019
  2. 1/2 t0028: fix test for UTF-16-LE-BOMAlexandr Miloslavskiy via GitGitGadget, Sep 23, 2019
  3. 2/2 t0028: add more testsAlexandr Miloslavskiy via GitGitGadget, Sep 23, 2019
  4. 0/2 Update: fixed typos in commit messageAlexandr Miloslavskiy via GitGitGadget, Sep 23, 2019
  5. 1/2 t0028: fix test for UTF-16-LE-BOMAlexandr Miloslavskiy via GitGitGadget, Sep 23, 2019
  6. Torsten BögershausenSep 24, 2019
  7. Alexandr MiloslavskiySep 24, 2019
  8. 2/2 t0028: add more testsAlexandr Miloslavskiy via GitGitGadget, Sep 23, 2019
  9. Torsten BögershausenSep 24, 2019
  10. Alexandr MiloslavskiySep 24, 2019
  11. Johannes SixtSep 24, 2019
  12. Alexandr MiloslavskiySep 24, 2019
  13. 0/2 Update: fixed typos in commit messageAlexandr Miloslavskiy via GitGitGadget, Sep 24, 2019
  14. 2/2 t0028: add more testsAlexandr Miloslavskiy via GitGitGadget, Sep 24, 2019
  15. Junio C HamanoSep 28, 2019
  16. Alexandr MiloslavskiySep 30, 2019
  17. 1/2 t0028: fix test for UTF-16-LE-BOMAlexandr Miloslavskiy via GitGitGadget, Sep 24, 2019
  18. Torsten BögershausenSep 26, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.