aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2011-08-04 06:36:29 +0200
committerJunio C Hamano <gitster@pobox.com>2011-08-04 15:53:19 -0700
commitfdf6be8259fc59fc251b325f66e86df0fe905e79 (patch)
tree8c15c88e07bbed40cc1b1db6fab25bcddda6f9b4 /t
parent72541040c3ed00084344de5bf75cbc5a514504bb (diff)
downloadgit-fdf6be8259fc59fc251b325f66e86df0fe905e79.tar.gz
git-fdf6be8259fc59fc251b325f66e86df0fe905e79.tar.xz
git-check-attr: Error out if no pathnames are specified
If no pathnames are passed as command-line arguments and the --stdin option is not specified, fail with the error message "No file specified". Add tests of this behavior. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t0003-attributes.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh
index f1debeb7a..22540051d 100755
--- a/t/t0003-attributes.sh
+++ b/t/t0003-attributes.sh
@@ -46,6 +46,8 @@ test_expect_success 'command line checks' '
test_must_fail git check-attr &&
test_must_fail git check-attr -- &&
+ test_must_fail git check-attr test &&
+ test_must_fail git check-attr test -- &&
test_must_fail git check-attr -- f &&
echo "f" | test_must_fail git check-attr --stdin &&
echo "f" | test_must_fail git check-attr --stdin -- f &&