Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] Add missing test file for UTF-16.

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:58:20
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

Duy Nguyen [off-list ref] writes:
The intention was "UTF-16 is not supported yet but we want to". But I
don't think we (at least I) will put any effort on that front to allow
NUL in commit message, so the patch, as in "we do not support UTF-16",
is fine.
Agreed.  Here is what I queued.

-- >8 --
Subject: [PATCH] t3900: test rejecting log message with NULs correctly

It is not like that our longer term desire is to someday start
accepting log messages with NULs in them, so it is wrong to mark a test
that demonstrates "git commit" that correctly fails given such an
input as "expect-failure".  "git commit" should fail today, and it
should fail the same way in the future given a message with NUL in it.

Signed-off-by: Junio C Hamano <redacted>
---
 t/t3900-i18n-commit.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t3900-i18n-commit.sh b/t/t3900-i18n-commit.sh
index d48a7c0..a9e5662 100755
--- a/t/t3900-i18n-commit.sh
+++ b/t/t3900-i18n-commit.sh
@@ -34,9 +34,9 @@ test_expect_success 'no encoding header for base case' '
 	test z = "z$E"
 '
 
-test_expect_failure 'UTF-16 refused because of NULs' '
+test_expect_success 'UTF-16 refused because of NULs' '
 	echo UTF-16 >F &&
-	git commit -a -F "$TEST_DIRECTORY"/t3900/UTF-16.txt
+	test_must_fail git commit -a -F "$TEST_DIRECTORY"/t3900/UTF-16.txt
 '
 
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help