Thread (234 messages) flat view 234 messages, 5 authors, 2017-04-07

Re: [PATCH v6 26/27] t1406: new tests for submodule ref store

From: Michael Haggerty <hidden>
Date: 2017-03-20 05:27:19

On 03/18/2017 03:03 AM, Nguyễn Thái Ngọc Duy wrote:
quoted hunk ↗ jump to hunk
Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
---
 t/t1406-submodule-ref-store.sh (new +x) | 95 +++++++++++++++++++++++++++++++++
 1 file changed, 95 insertions(+)
 create mode 100755 t/t1406-submodule-ref-store.sh
diff --git a/t/t1406-submodule-ref-store.sh b/t/t1406-submodule-ref-store.sh
new file mode 100755
index 0000000000..22214ebd32
--- /dev/null
+++ b/t/t1406-submodule-ref-store.sh
@@ -0,0 +1,95 @@
+#!/bin/sh
+
+test_description='test submodule ref store api'
+
+. ./test-lib.sh
+
+RUN="test-ref-store submodule:sub"
+
+test_expect_success 'setup' '
+	git init sub &&
+	(
+		cd sub &&
+		test_commit first &&
+		git checkout -b new-master
+	)
+'
+
+test_expect_success 'pack_refs() not allowed' '
+	test_must_fail $RUN pack-refs 3
+'
It's a little bit unfortunate but probably OK that this test and its
analog in t1405 hard-code internal numerical constants. At least in
t1405 the names of the constants appear in the test name, meaning that
anybody changing the constants' values in the future will probably find
the "3" in that file. Would you do the same here, please, or at least
mention the constant names in a comment here?
[...]
Michael
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help