[PATCH v4 22/24] t1600: add index v5 specific tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add a test that tests only index v5 specific corner cases, to protect
against breaking them in the future.

Currently there is only one known case where the sorting is broken if
the index is read filtered with two different length pathspecs.

Signed-off-by: Thomas Gummerer <t.gummerer@xxxxxxxxx>
---
 t/t1600-index-v5.sh | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100755 t/t1600-index-v5.sh

diff --git a/t/t1600-index-v5.sh b/t/t1600-index-v5.sh
new file mode 100755
index 0000000..fe68976
--- /dev/null
+++ b/t/t1600-index-v5.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+test_description="Test index-v5 specific corner cases"
+
+. ./test-lib.sh
+
+test_set_index_version 5
+
+test_expect_success 'setup' '
+	mkdir -p abc/def def &&
+	touch abc/def/xyz def/xyz &&
+	git add . &&
+	git commit -m "test commit"
+'
+
+test_expect_success 'ls-files ordering correct' '
+	cat <<-\EOF >expected &&
+	abc/def/xyz
+	def/xyz
+	EOF
+	git ls-files abc/def/xyz def/xyz >actual &&
+	test_cmp expected actual
+'
+
+test_done
-- 
1.8.4.2

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]