http-backend test: make empty CONTENT_LENGTH test more realistic
[gitweb.git] / t / t4201-shortlog.sh
index da10478f59da1a301edf7def229d37fbc964dce9..58c27736762dde372408a4dacfb030f0e1a55b99 100755 (executable)
@@ -59,7 +59,7 @@ test_expect_success 'setup' '
 fuzz() {
        file=$1 &&
        sed "
-                       s/$_x40/OBJECT_NAME/g
+                       s/$OID_REGEX/OBJECT_NAME/g
                        s/$_x35/OBJID/g
                        s/^ \{6\}[CTa].*/      SUBJECT/g
                        s/^ \{8\}[^ ].*/        CONTINUATION/g
@@ -127,6 +127,11 @@ test_expect_success !MINGW 'shortlog can read --format=raw output' '
        test_cmp expect out
 '
 
+test_expect_success 'shortlog from non-git directory refuses extra arguments' '
+       test_must_fail env GIT_DIR=non-existing git shortlog foo 2>out &&
+       test_i18ngrep "too many arguments" out
+'
+
 test_expect_success 'shortlog should add newline when input line matches wraplen' '
        cat >expect <<\EOF &&
 A U Thor (2):