Thread (2 messages) flat view 2 messages, 1 author, 2016-06-15
DORMANTno replies

[PATCH 1/3] t0050: mark non-working test as such

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

The test is to prepare an empty file "camelcase" in the index, remove
and replace it with another file "CamelCase" with "1" as its contents
in the working tree, and add it to the index, in a repository configured
to be case insensitive.

However, the test actually checked ls-files knows about a pathname that
matches "camelcase" case insensitively.  It didn't check if the added
contents actually was the updated one.

Mark the test as non-working.

Signed-off-by: Junio C Hamano <redacted>
---

 * This comes from 8a19aaa (t0050: Add test for case insensitive add,
   2008-05-11); back then the code did add both camelcase and CamelCase,
   and somewhere after that we once fixed it, but 1e5f764 (builtin-add.c:
   optimize -A option and "git add .", 2008-07-22) broke it in a different
   way (namely, it stopped adding the updated contents); I am not going to
   have time to debug it further anytime soon (hint hint)...

 t/t0050-filesystem.sh |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh
index 89282cc..41df6bc 100755
--- a/t/t0050-filesystem.sh
+++ b/t/t0050-filesystem.sh
@@ -108,13 +108,17 @@ $test_case 'merge (case change)' '
 
 '
 
-$test_case 'add (with different case)' '
+
+
+test_expect_failure 'add (with different case)' '
 
 	git reset --hard initial &&
 	rm camelcase &&
 	echo 1 >CamelCase &&
 	git add CamelCase &&
-	test $(git ls-files | grep -i camelcase | wc -l) = 1
+	camel=$(git ls-files | grep -i camelcase) &&
+	test $(echo "$camel" | wc -l) = 1 &&
+	test "z$(git cat-file blob :$camel)" = z1
 
 '
 
-- 
1.7.0.1.241.g6604f
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help