attr: make sure we have an xdg path before using it
[gitweb.git] / t / t1306-xdg-files.sh
index 3c75c3f2e7e8f980a83fa05db24cf64e7b1cd5a3..1569596ab3beee2cecb14349f7676faa4c6ee02e 100755 (executable)
@@ -106,6 +106,12 @@ test_expect_success 'Checking attributes in the XDG attributes file' '
        test_cmp expected actual
 '
 
+test_expect_success 'Checking XDG attributes when HOME is unset' '
+       >expected &&
+       (sane_unset HOME &&
+        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 &&