[PATCH 3/3] t1306: check that XDG_CONFIG_HOME works

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

 



This should override $HOME/.config, but we never actually
tested it.

Signed-off-by: Jeff King <peff@xxxxxxxx>
---
 t/t1306-xdg-files.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/t/t1306-xdg-files.sh b/t/t1306-xdg-files.sh
index 1569596..4447949 100755
--- a/t/t1306-xdg-files.sh
+++ b/t/t1306-xdg-files.sh
@@ -113,6 +113,14 @@ test_expect_success 'Checking XDG attributes when HOME is unset' '
 	test_cmp expected actual
 '
 
+test_expect_success 'Prefer XDG_CONFIG_HOME to HOME/.config' '
+	echo "f: attr_f: foo" >expected &&
+	mkdir -p foo/git &&
+	echo "f attr_f=foo" >foo/git/attributes &&
+	XDG_CONFIG_HOME="foo" git check-attr -a f >actual &&
+	test_cmp expected actual
+'
+
 test_expect_success 'Checking attributes in both XDG and local attributes files' '
 	echo "f -attr_f" >.gitattributes &&
 	echo "f: attr_f: unset" >expected &&
-- 
1.7.11.3.4.g9f70dbb
--
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]