summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-05-09 05:37:05 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-05-09 05:37:05 (GMT)
commitb7d0da858bb2f22c6ef3dbb20c1ded0302f4eaca (patch)
tree9e5ea99eda97aaeb825d52978c710453379a226e /t
parent67e5c87cd60668c97712b14af8562b558239a757 (diff)
parentec775c41dc4bb7382ebbbb61ede59e63846b3644 (diff)
downloadgit-b7d0da858bb2f22c6ef3dbb20c1ded0302f4eaca.zip
git-b7d0da858bb2f22c6ef3dbb20c1ded0302f4eaca.tar.gz
git-b7d0da858bb2f22c6ef3dbb20c1ded0302f4eaca.tar.bz2
Merge branch 'hg/maint-attr-fix'
* hg/maint-attr-fix: attr: Expand macros immediately when encountered. attr: Allow multiple changes to an attribute on the same line. attr: Fixed debug output for macro expansion.
Diffstat (limited to 't')
-rwxr-xr-xt/t0003-attributes.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh
index 1c77192..53bd7fc 100755
--- a/t/t0003-attributes.sh
+++ b/t/t0003-attributes.sh
@@ -20,8 +20,12 @@ test_expect_success 'setup' '
mkdir -p a/b/d a/c &&
(
+ echo "[attr]notest !test"
echo "f test=f"
echo "a/i test=a/i"
+ echo "onoff test -test"
+ echo "offon -test test"
+ echo "no notest"
) >.gitattributes &&
(
echo "g test=a/g" &&
@@ -30,6 +34,7 @@ test_expect_success 'setup' '
(
echo "h test=a/b/h" &&
echo "d/* test=a/b/d/*"
+ echo "d/yes notest"
) >a/b/.gitattributes
'
@@ -44,6 +49,11 @@ test_expect_success 'attribute test' '
attr_check b/g unspecified &&
attr_check a/b/h a/b/h &&
attr_check a/b/d/g "a/b/d/*"
+ attr_check onoff unset
+ attr_check offon set
+ attr_check no unspecified
+ attr_check a/b/d/no "a/b/d/*"
+ attr_check a/b/d/yes unspecified
'
@@ -58,6 +68,11 @@ a/b/g: test: a/b/g
b/g: test: unspecified
a/b/h: test: a/b/h
a/b/d/g: test: a/b/d/*
+onoff: test: unset
+offon: test: set
+no: test: unspecified
+a/b/d/no: test: a/b/d/*
+a/b/d/yes: test: unspecified
EOF
sed -e "s/:.*//" < expect | git check-attr --stdin test > actual &&