summaryrefslogtreecommitdiff
path: root/t/t0003-attributes.sh
diff options
context:
space:
mode:
authorDmitry Potapov <dpotapov@gmail.com>2008-10-07 00:16:52 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2008-10-12 20:21:59 (GMT)
commitb4666852a06af0c969ad8f1c444d0b48c4451e76 (patch)
tree8bf6bc3580c3e03d3277828bdf47a2f1fc7770be /t/t0003-attributes.sh
parent41038c5e1534a6abef21ec4cfc216d13d0ac2fb5 (diff)
downloadgit-b4666852a06af0c969ad8f1c444d0b48c4451e76.zip
git-b4666852a06af0c969ad8f1c444d0b48c4451e76.tar.gz
git-b4666852a06af0c969ad8f1c444d0b48c4451e76.tar.bz2
check-attr: Add --stdin option
This allows multiple paths to be specified on stdin. Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 't/t0003-attributes.sh')
-rwxr-xr-xt/t0003-attributes.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh
index 3d8e06a..1c77192 100755
--- a/t/t0003-attributes.sh
+++ b/t/t0003-attributes.sh
@@ -47,6 +47,23 @@ test_expect_success 'attribute test' '
'
+test_expect_success 'attribute test: read paths from stdin' '
+
+ cat <<EOF > expect
+f: test: f
+a/f: test: f
+a/c/f: test: f
+a/g: test: a/g
+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/*
+EOF
+
+ sed -e "s/:.*//" < expect | git check-attr --stdin test > actual &&
+ test_cmp expect actual
+'
+
test_expect_success 'root subdir attribute test' '
attr_check a/i a/i &&