All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexandr Miloslavskiy via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
	Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
Subject: [PATCH v3 1/2] t0028: fix test for UTF-16-LE-BOM
Date: Tue, 24 Sep 2019 03:40:29 -0700 (PDT)	[thread overview]
Message-ID: <438ac961a559b656326ebef0b3a7cf924f4ccfd2.1569321628.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.347.v3.git.gitgitgadget@gmail.com>

From: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>

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.

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

Fix the test to follow its original intention.

Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
---
 t/t0028-working-tree-encoding.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t0028-working-tree-encoding.sh b/t/t0028-working-tree-encoding.sh
index 1090e650ed..5493cf3ca9 100755
--- a/t/t0028-working-tree-encoding.sh
+++ b/t/t0028-working-tree-encoding.sh
@@ -40,7 +40,7 @@ test_expect_success 'setup test files' '
 	printf "$text" | write_utf16 >test.utf16.raw &&
 	printf "$text" | write_utf32 >test.utf32.raw &&
 	printf "\377\376"                         >test.utf16lebom.raw &&
-	printf "$text" | iconv -f UTF-8 -t UTF-32LE >>test.utf16lebom.raw &&
+	printf "$text" | iconv -f UTF-8 -t UTF-16LE >>test.utf16lebom.raw &&
 
 	# Line ending tests
 	printf "one\ntwo\nthree\n" >lf.utf8.raw &&
-- 
gitgitgadget


  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 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
2019-09-24 10:40   ` [PATCH v3 0/2] Update: fixed typos in commit message Alexandr Miloslavskiy via GitGitGadget
2019-09-24 10:40     ` Alexandr Miloslavskiy via GitGitGadget [this message]
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=438ac961a559b656326ebef0b3a7cf924f4ccfd2.1569321628.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=alexandr.miloslavskiy@syntevo.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.
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.